-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8ef8c97
commit 5ce4ce9
Showing
50 changed files
with
1,169 additions
and
438 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
apps/mobile/src/app/(home)/developer-console/bitcoin-scratch-pad.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
apps/mobile/src/features/approver/components/bitcoin-outcome.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { BitcoinTokenBalance } from '@/features/balances/bitcoin/bitcoin-balance'; | ||
import { useBtcMarketDataQuery } from '@/queries/market-data/btc-market-data.query'; | ||
import { t } from '@lingui/macro'; | ||
|
||
import { Money } from '@leather.io/models'; | ||
import { Text } from '@leather.io/ui/native'; | ||
import { baseCurrencyAmountInQuote, createMoney } from '@leather.io/utils'; | ||
|
||
export function BitcoinOutcome({ amount }: { amount: Money }) { | ||
const { data: btcMarketData } = useBtcMarketDataQuery(); | ||
|
||
const fiatBalance = btcMarketData | ||
? baseCurrencyAmountInQuote(amount, btcMarketData) | ||
: createMoney(0, 'USD'); | ||
|
||
return ( | ||
<> | ||
<Text variant="label01"> | ||
{t({ | ||
id: 'approver.outcomes.title1', | ||
message: "You'll send", | ||
})} | ||
</Text> | ||
<BitcoinTokenBalance availableBalance={amount} fiatBalance={fiatBalance} py="3" /> | ||
</> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.