Skip to content

Commit

Permalink
Merge branch 'main' into chore/ic-mgmt-dev
Browse files Browse the repository at this point in the history
  • Loading branch information
peterpeterparker authored Dec 23, 2024
2 parents ab07532 + 11fe55e commit 10870d0
Show file tree
Hide file tree
Showing 7 changed files with 155 additions and 58 deletions.
9 changes: 9 additions & 0 deletions .github/repo_policies/BOT_APPROVED_FILES
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# List of approved files that can be changed by a bot via an automated PR
# This is to increase security and prevent accidentally updating files that shouldn't be changed by a bot

package.json
package-lock.json
e2e/**/*.png
declarations/**/*
src/frontend/src/env/tokens/tokens.*.json
src/frontend/src/env/tokens/tokens-erc20/
93 changes: 47 additions & 46 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,14 @@
"@dfinity/agent": "^2.1.2",
"@dfinity/auth-client": "^2.1.2",
"@dfinity/candid": "^2.1.2",
"@dfinity/ckbtc": "^3.1.0",
"@dfinity/cketh": "^3.3.1",
"@dfinity/ckbtc": "^3.1.5",
"@dfinity/cketh": "^3.4.2",
"@dfinity/gix-components": "^5.0.0-next-2024-12-10",
"@dfinity/ic-management": "^5.2.1",
"@dfinity/ledger-icp": "^2.6.0",
"@dfinity/ledger-icrc": "^2.6.0",
"@dfinity/oisy-wallet-signer": "^0.0.1",
"@dfinity/ledger-icp": "^2.6.5",
"@dfinity/ledger-icrc": "^2.7.0",
"@dfinity/oisy-wallet-signer": "^0.0.3",
"@dfinity/principal": "^2.1.2",
"@dfinity/utils": "^2.5.1",
"@dfinity/utils": "^2.8.0",
"@dfinity/verifiable-credentials": "^0.0.4",
"@junobuild/analytics": "^0.0.31",
"@metamask/detect-provider": "^2.0.0",
Expand All @@ -77,12 +76,13 @@
},
"devDependencies": {
"@dfinity/eslint-config-oisy-wallet": "^0.0.6",
"@dfinity/ic-management": "^6.0.2",
"@dfinity/identity-secp256k1": "^2.1.2",
"@dfinity/internet-identity-playwright": "^0.0.4",
"@playwright/test": "^1.49.1",
"@rollup/plugin-inject": "^5.0.5",
"@solana/rpc-types": "^2.0.0",
"@sveltejs/adapter-static": "^3.0.6",
"@sveltejs/adapter-static": "^3.0.8",
"@sveltejs/kit": "^2.11.1",
"@sveltejs/vite-plugin-svelte": "^3.1.2",
"@testing-library/jest-dom": "^6.6.3",
Expand Down
73 changes: 71 additions & 2 deletions src/frontend/src/lib/components/receive/ReceiveAddresses.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,26 @@
ETHEREUM_NETWORK,
ICP_NETWORK
} from '$env/networks/networks.env';
import {
SOLANA_MAINNET_NETWORK,
SOLANA_TESTNET_NETWORK,
SOLANA_DEVNET_NETWORK,
SOLANA_LOCAL_NETWORK,
SOLANA_NETWORK_ENABLED
} from '$env/networks/networks.sol.env';
import {
BTC_MAINNET_TOKEN,
BTC_REGTEST_TOKEN,
BTC_TESTNET_TOKEN
} from '$env/tokens/tokens.btc.env';
import { ETHEREUM_TOKEN } from '$env/tokens/tokens.eth.env';
import { ICP_TOKEN } from '$env/tokens/tokens.icp.env';
import {
SOLANA_TOKEN,
SOLANA_TESTNET_TOKEN,
SOLANA_DEVNET_TOKEN,
SOLANA_LOCAL_TOKEN
} from '$env/tokens/tokens.sol.env';
import { icpAccountIdentifierText, icrcAccountIdentifierText } from '$icp/derived/ic.derived';
import ReceiveAddress from '$lib/components/receive/ReceiveAddress.svelte';
import ButtonDone from '$lib/components/ui/ButtonDone.svelte';
Expand All @@ -28,13 +41,21 @@
RECEIVE_TOKENS_MODAL_DONE_BUTTON,
RECEIVE_TOKENS_MODAL_BTC_TESTNET_SECTION,
RECEIVE_TOKENS_MODAL_BTC_REGTEST_SECTION,
RECEIVE_TOKENS_MODAL_QR_CODE_BUTTON
RECEIVE_TOKENS_MODAL_QR_CODE_BUTTON,
RECEIVE_TOKENS_MODAL_SOL_MAINNET_SECTION,
RECEIVE_TOKENS_MODAL_SOL_TESTNET_SECTION,
RECEIVE_TOKENS_MODAL_SOL_DEVNET_SECTION,
RECEIVE_TOKENS_MODAL_SOL_LOCAL_SECTION
} from '$lib/constants/test-ids.constants';
import {
btcAddressMainnet,
btcAddressRegtest,
btcAddressTestnet,
ethAddress
ethAddress,
solAddressDevnet,
solAddressLocal,
solAddressMainnet,
solAddressTestnet
} from '$lib/derived/address.derived';
import { testnets } from '$lib/derived/testnets.derived';
import { i18n } from '$lib/stores/i18n.store';
Expand Down Expand Up @@ -142,6 +163,54 @@
label: $i18n.receive.icp.text.icp_account,
copyAriaLabel: $i18n.receive.icp.text.icp_account_copied,
qrCodeAriaLabel: $i18n.receive.icp.text.display_icp_account_qr
},
{
labelRef: 'solAddressMainnet',
address: $solAddressMainnet,
network: SOLANA_MAINNET_NETWORK,
token: SOLANA_TOKEN,
testId: RECEIVE_TOKENS_MODAL_SOL_MAINNET_SECTION,
title: $i18n.receive.solana.text.solana_address,
label: $i18n.receive.solana.text.solana_address,
copyAriaLabel: $i18n.receive.solana.text.solana_address_copied,
qrCodeAriaLabel: $i18n.receive.solana.text.display_solana_address_qr,
condition: SOLANA_NETWORK_ENABLED
},
{
labelRef: 'solAddressTestnet',
address: $solAddressTestnet,
network: SOLANA_TESTNET_NETWORK,
token: SOLANA_TESTNET_TOKEN,
testId: RECEIVE_TOKENS_MODAL_SOL_TESTNET_SECTION,
title: $i18n.receive.solana.text.solana_testnet_address,
label: $i18n.receive.solana.text.solana_testnet_address,
copyAriaLabel: $i18n.receive.solana.text.solana_address_copied,
qrCodeAriaLabel: $i18n.receive.solana.text.display_solana_address_qr,
condition: SOLANA_NETWORK_ENABLED && $testnets
},
{
labelRef: 'solAddressDevnet',
address: $solAddressDevnet,
network: SOLANA_DEVNET_NETWORK,
token: SOLANA_DEVNET_TOKEN,
testId: RECEIVE_TOKENS_MODAL_SOL_DEVNET_SECTION,
title: $i18n.receive.solana.text.solana_devnet_address,
label: $i18n.receive.solana.text.solana_devnet_address,
copyAriaLabel: $i18n.receive.solana.text.solana_address_copied,
qrCodeAriaLabel: $i18n.receive.solana.text.display_solana_address_qr,
condition: SOLANA_NETWORK_ENABLED && $testnets
},
{
labelRef: 'solAddressLocal',
address: $solAddressLocal,
network: SOLANA_LOCAL_NETWORK,
token: SOLANA_LOCAL_TOKEN,
testId: RECEIVE_TOKENS_MODAL_SOL_LOCAL_SECTION,
title: $i18n.receive.solana.text.solana_local_address,
label: $i18n.receive.solana.text.solana_local_address,
copyAriaLabel: $i18n.receive.solana.text.solana_address_copied,
qrCodeAriaLabel: $i18n.receive.solana.text.display_solana_address_qr,
condition: SOLANA_NETWORK_ENABLED && $testnets && LOCAL
}
];
Expand Down
4 changes: 4 additions & 0 deletions src/frontend/src/lib/constants/test-ids.constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ export const RECEIVE_TOKENS_MODAL_BTC_MAINNET_SECTION = 'receive-tokens-modal-bt
export const RECEIVE_TOKENS_MODAL_BTC_TESTNET_SECTION = 'receive-tokens-modal-btc-testnet-section';
export const RECEIVE_TOKENS_MODAL_BTC_REGTEST_SECTION = 'receive-tokens-modal-btc-regtest-section';
export const RECEIVE_TOKENS_MODAL_ETH_SECTION = 'receive-tokens-modal-eth-section';
export const RECEIVE_TOKENS_MODAL_SOL_MAINNET_SECTION = 'receive-tokens-modal-sol-mainnet-section';
export const RECEIVE_TOKENS_MODAL_SOL_TESTNET_SECTION = 'receive-tokens-modal-sol-testnet-section';
export const RECEIVE_TOKENS_MODAL_SOL_DEVNET_SECTION = 'receive-tokens-modal-sol-devnet-section';
export const RECEIVE_TOKENS_MODAL_SOL_LOCAL_SECTION = 'receive-tokens-modal-sol-local-section';

export const RECEIVE_TOKENS_MODAL_ADDRESS_LABEL = 'receive-tokens-modal-address-label';

Expand Down
7 changes: 6 additions & 1 deletion src/frontend/src/lib/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,12 @@
},
"solana": {
"text": {
"solana_address_copied": "Solana Address copied to clipboard."
"solana_address": "Solana Address",
"solana_testnet_address": "Solana Testnet Address",
"solana_devnet_address": "Solana Devnet Address",
"solana_local_address": "Solana Local Address",
"solana_address_copied": "Solana address copied to clipboard",
"display_solana_address_qr": "Display Solana address as QR code"
}
}
},
Expand Down
11 changes: 10 additions & 1 deletion src/frontend/src/lib/types/i18n.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,16 @@ interface I18nReceive {
info: { no_new_btc: string; check_btc_progress: string };
error: { unexpected_btc: string };
};
solana: { text: { solana_address_copied: string } };
solana: {
text: {
solana_address: string;
solana_testnet_address: string;
solana_devnet_address: string;
solana_local_address: string;
solana_address_copied: string;
display_solana_address_qr: string;
};
};
}

interface I18nSend {
Expand Down

0 comments on commit 10870d0

Please sign in to comment.