Skip to content

Commit

Permalink
feat(frontend): display regtest BTC address
Browse files Browse the repository at this point in the history
  • Loading branch information
DenysKarmazynDFINITY committed Oct 9, 2024
1 parent ab19db9 commit 5e10e4e
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/frontend/src/btc/components/core/BtcWalletAddress.svelte
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
<script lang="ts">
import Copy from '$lib/components/ui/Copy.svelte';
import { btcAddressMainnet, btcAddressTestnet } from '$lib/derived/address.derived';
import {
btcAddressMainnet,
btcAddressTestnet,
btcAddressRegtest
} from '$lib/derived/address.derived';
import { networkId } from '$lib/derived/network.derived';
import { i18n } from '$lib/stores/i18n.store';
import { shortenWithMiddleEllipsis } from '$lib/utils/format.utils';
import { isNetworkIdBTCRegtest, isNetworkIdBTCTestnet } from '$lib/utils/network.utils';
// Regtest and Testnet BTC wallets have the same address
const address =
isNetworkIdBTCTestnet($networkId) || isNetworkIdBTCRegtest($networkId)
? $btcAddressTestnet
const address = isNetworkIdBTCTestnet($networkId)
? $btcAddressTestnet
: isNetworkIdBTCRegtest($networkId)
? $btcAddressRegtest
: $btcAddressMainnet;
</script>

Expand Down

0 comments on commit 5e10e4e

Please sign in to comment.