diff --git a/package.json b/package.json index 8a142c71..51b73958 100644 --- a/package.json +++ b/package.json @@ -24,23 +24,23 @@ }, "dependencies": { "@avalabs/avalanche-module": "0.0.0-feat-p-dynamic-fees-20241107092624", - "@avalabs/avalanchejs": "4.1.0-alpha.15", + "@avalabs/avalanchejs": "4.1.0-alpha.18", "@avalabs/bitcoin-module": "0.0.0-feat-p-dynamic-fees-20241107092624", "@avalabs/bridge-unified": "0.0.0-feat-ictt-configs-20241009072139", - "@avalabs/core-bridge-sdk": "3.1.0-canary.78916bb.0+78916bb", - "@avalabs/core-chains-sdk": "3.1.0-canary.78916bb.0+78916bb", - "@avalabs/core-coingecko-sdk": "3.1.0-canary.78916bb.0+78916bb", - "@avalabs/core-covalent-sdk": "3.1.0-canary.78916bb.0+78916bb", - "@avalabs/core-etherscan-sdk": "3.1.0-canary.78916bb.0+78916bb", + "@avalabs/core-bridge-sdk": "3.1.0-canary.c0d7afa.0", + "@avalabs/core-chains-sdk": "3.1.0-canary.c0d7afa.0", + "@avalabs/core-coingecko-sdk": "3.1.0-canary.c0d7afa.0", + "@avalabs/core-covalent-sdk": "3.1.0-canary.c0d7afa.0", + "@avalabs/core-etherscan-sdk": "3.1.0-canary.c0d7afa.0", "@avalabs/core-k2-components": "4.18.0-alpha.47", - "@avalabs/core-snowtrace-sdk": "3.1.0-canary.78916bb.0+78916bb", - "@avalabs/core-token-prices-sdk": "3.1.0-canary.78916bb.0+78916bb", - "@avalabs/core-utils-sdk": "3.1.0-canary.78916bb.0+78916bb", - "@avalabs/core-wallets-sdk": "3.1.0-canary.78916bb.0+78916bb", + "@avalabs/core-snowtrace-sdk": "3.1.0-canary.c0d7afa.0", + "@avalabs/core-token-prices-sdk": "3.1.0-canary.c0d7afa.0", + "@avalabs/core-utils-sdk": "3.1.0-canary.c0d7afa.0", + "@avalabs/core-wallets-sdk": "3.1.0-canary.c0d7afa.0", "@avalabs/evm-module": "0.0.0-feat-p-dynamic-fees-20241107092624", - "@avalabs/glacier-sdk": "3.1.0-canary.78916bb.0+78916bb", + "@avalabs/glacier-sdk": "3.1.0-canary.c0d7afa.0", "@avalabs/hw-app-avalanche": "0.14.1", - "@avalabs/types": "3.1.0-canary.78916bb.0+78916bb", + "@avalabs/types": "3.1.0-canary.c0d7afa.0", "@avalabs/vm-module-types": "0.0.0-feat-p-dynamic-fees-20241107092624", "@blockaid/client": "0.10.0", "@coinbase/cbpay-js": "1.6.0", diff --git a/src/pages/ApproveAction/AvalancheSignTx.tsx b/src/pages/ApproveAction/AvalancheSignTx.tsx index 85786e5e..0e517928 100644 --- a/src/pages/ApproveAction/AvalancheSignTx.tsx +++ b/src/pages/ApproveAction/AvalancheSignTx.tsx @@ -37,6 +37,7 @@ import { FunctionNames, useIsFunctionAvailable, } from '@src/hooks/useIsFunctionAvailable'; +import { ApproveConvertSubnet } from './components/ApproveConvertSubnet'; export function AvalancheSignTx() { const requestId = useGetRequestId(); @@ -136,6 +137,9 @@ export function AvalancheSignTx() { return ; } else if (Avalanche.isBaseTx(tx)) { return ; + } else if (tx.type === Avalanche.TxType.ConvertSubnet) { + // TODO: use the helper + return ; } else if (Avalanche.isCreateSubnetTx(tx)) { return ( + + + + + + + + + + + + + + + + + + {validators.map( + ({ + balance, + stake, + nodeId, + remainingBalanceOwners, + deactivationOwners, + }) => ( + + + + + + + + + + + + + {deactivationOwners.map((address) => ( + + ))} + + + + + {remainingBalanceOwners.map((address) => ( + + ))} + + + + ) + )} + + + + + + + + + + + + ); +} diff --git a/yarn.lock b/yarn.lock index 14ca25f7..fd4e7057 100644 --- a/yarn.lock +++ b/yarn.lock @@ -59,6 +59,17 @@ "@scure/base" "1.1.5" micro-eth-signer "0.7.2" +"@avalabs/avalanchejs@4.1.0-alpha.18": + version "4.1.0-alpha.18" + resolved "https://registry.yarnpkg.com/@avalabs/avalanchejs/-/avalanchejs-4.1.0-alpha.18.tgz#5bdefefebf456bdd9cfce1f1c1abe26f9277fbb7" + integrity sha512-erDvZwsst+hCegRF9qyVF03wM35EKplIz01W6FOMLq2jSE2tAy66QpVtB2Y5r9OphKU62Yx/7xtT0eqMDSosUA== + dependencies: + "@noble/curves" "1.3.0" + "@noble/hashes" "1.3.3" + "@noble/secp256k1" "2.0.0" + "@scure/base" "1.1.5" + micro-eth-signer "0.7.2" + "@avalabs/bitcoin-module@0.0.0-feat-p-dynamic-fees-20241107092624": version "0.0.0-feat-p-dynamic-fees-20241107092624" resolved "https://registry.yarnpkg.com/@avalabs/bitcoin-module/-/bitcoin-module-0.0.0-feat-p-dynamic-fees-20241107092624.tgz#254a009eb34680606ac7fb084ac40713be7270d7" @@ -86,14 +97,14 @@ viem "2.11.1" zod "3.23.8" -"@avalabs/core-bridge-sdk@3.1.0-canary.78916bb.0+78916bb": - version "3.1.0-canary.78916bb.0" - resolved "https://registry.yarnpkg.com/@avalabs/core-bridge-sdk/-/core-bridge-sdk-3.1.0-canary.78916bb.0.tgz#7283ab66e0eeb3ca0fe92f62c08708809de65df0" - integrity sha512-5mr02Gt3vrEwLNQirqNDAQE55n6KOf3QVApt4F9GGpIYCN1YwLri8SBhKKyP/m34rMjha79a5mPno5LtqPdnmA== +"@avalabs/core-bridge-sdk@3.1.0-canary.c0d7afa.0": + version "3.1.0-canary.c0d7afa.0" + resolved "https://registry.yarnpkg.com/@avalabs/core-bridge-sdk/-/core-bridge-sdk-3.1.0-canary.c0d7afa.0.tgz#68a3c2626455cf923978b8be4172954b69ed5569" + integrity sha512-r2nLGbKmBMivHhN/U9EM4t8Rfccg9J3Un/IKCtr6Pb993YjhwZ136K+EFVIL3VoaJ02sDxZO6g3rmwpW0kBTQA== dependencies: - "@avalabs/core-coingecko-sdk" "3.1.0-canary.78916bb.0+78916bb" - "@avalabs/core-utils-sdk" "3.1.0-canary.78916bb.0+78916bb" - "@avalabs/core-wallets-sdk" "3.1.0-canary.78916bb.0+78916bb" + "@avalabs/core-coingecko-sdk" "3.1.0-canary.c0d7afa.0+c0d7afa" + "@avalabs/core-utils-sdk" "3.1.0-canary.c0d7afa.0+c0d7afa" + "@avalabs/core-wallets-sdk" "3.1.0-canary.c0d7afa.0+c0d7afa" "@avalabs/core-chains-sdk@3.1.0-canary.78916bb.0+78916bb": version "3.1.0-canary.78916bb.0" @@ -102,6 +113,13 @@ dependencies: "@avalabs/core-utils-sdk" "3.1.0-canary.78916bb.0+78916bb" +"@avalabs/core-chains-sdk@3.1.0-canary.c0d7afa.0", "@avalabs/core-chains-sdk@3.1.0-canary.c0d7afa.0+c0d7afa": + version "3.1.0-canary.c0d7afa.0" + resolved "https://registry.yarnpkg.com/@avalabs/core-chains-sdk/-/core-chains-sdk-3.1.0-canary.c0d7afa.0.tgz#0bb5064fb726b67f063e4ac47027f184b8906190" + integrity sha512-tVVrlISOG8wSIUc36E3kpDMrDoQpZoyg79tQXyPg+VdeCE+c2EC71yxA7a9pAOcsm1ZeYugw/4Iclv0fPKVZVg== + dependencies: + "@avalabs/core-utils-sdk" "3.1.0-canary.c0d7afa.0+c0d7afa" + "@avalabs/core-coingecko-sdk@3.1.0-canary.78916bb.0+78916bb": version "3.1.0-canary.78916bb.0" resolved "https://registry.yarnpkg.com/@avalabs/core-coingecko-sdk/-/core-coingecko-sdk-3.1.0-canary.78916bb.0.tgz#ba2f5813a4da8a81ed3b365dbb41244042276ce0" @@ -109,12 +127,19 @@ dependencies: "@avalabs/core-utils-sdk" "3.1.0-canary.78916bb.0+78916bb" -"@avalabs/core-covalent-sdk@3.1.0-canary.78916bb.0+78916bb": - version "3.1.0-canary.78916bb.0" - resolved "https://registry.yarnpkg.com/@avalabs/core-covalent-sdk/-/core-covalent-sdk-3.1.0-canary.78916bb.0.tgz#ffcc021a83ef03987cdd88195cb15fab37383b18" - integrity sha512-Z0D0F6TGDSdRnm+KmFX4vK8OyLKSUi5ZJXTIYyHuubT9m/g16k0MzLPw/0PSh71ijb15vO7YUM9DAHclV4ZFIw== +"@avalabs/core-coingecko-sdk@3.1.0-canary.c0d7afa.0", "@avalabs/core-coingecko-sdk@3.1.0-canary.c0d7afa.0+c0d7afa": + version "3.1.0-canary.c0d7afa.0" + resolved "https://registry.yarnpkg.com/@avalabs/core-coingecko-sdk/-/core-coingecko-sdk-3.1.0-canary.c0d7afa.0.tgz#68a323f8b2ed4ce9f49ae346801098a63fb8a020" + integrity sha512-ipVME6K6EJVVfbtlV3pffs1XLnfBhBH7NAK21SpijulE2ca8QST5tp0UoxNjor6rZbZ9JSMmcLyU/6NxceEaYA== dependencies: - "@avalabs/core-utils-sdk" "3.1.0-canary.78916bb.0+78916bb" + "@avalabs/core-utils-sdk" "3.1.0-canary.c0d7afa.0+c0d7afa" + +"@avalabs/core-covalent-sdk@3.1.0-canary.c0d7afa.0": + version "3.1.0-canary.c0d7afa.0" + resolved "https://registry.yarnpkg.com/@avalabs/core-covalent-sdk/-/core-covalent-sdk-3.1.0-canary.c0d7afa.0.tgz#1658f431e53271d572f37697424a944441565224" + integrity sha512-JwxTpgnQzJX6n7WQt3rYduSPkAoG7Lx3VbJL6ifvZZ4ALQK09dpfBS5k2sHW0bN5JciPSIMPKcqW8v94Gauzkg== + dependencies: + "@avalabs/core-utils-sdk" "3.1.0-canary.c0d7afa.0+c0d7afa" "@avalabs/core-etherscan-sdk@3.1.0-canary.78916bb.0+78916bb": version "3.1.0-canary.78916bb.0" @@ -123,6 +148,13 @@ dependencies: "@avalabs/core-utils-sdk" "3.1.0-canary.78916bb.0+78916bb" +"@avalabs/core-etherscan-sdk@3.1.0-canary.c0d7afa.0": + version "3.1.0-canary.c0d7afa.0" + resolved "https://registry.yarnpkg.com/@avalabs/core-etherscan-sdk/-/core-etherscan-sdk-3.1.0-canary.c0d7afa.0.tgz#2ffa45f3bbc61cb9275b31ade3cf4a48a306020e" + integrity sha512-G/Owyp/k3pIvmuIMJu2jQhLGshbgSzRG1uhgwy6rY5D4OTqcVHr3LqHPSEDUD7HCyF1edsAndKpRoTgkln4i7A== + dependencies: + "@avalabs/core-utils-sdk" "3.1.0-canary.c0d7afa.0+c0d7afa" + "@avalabs/core-k2-components@4.18.0-alpha.47": version "4.18.0-alpha.47" resolved "https://registry.yarnpkg.com/@avalabs/core-k2-components/-/core-k2-components-4.18.0-alpha.47.tgz#94d588cf109350fe57d246dbf36bc127a1fc0584" @@ -146,20 +178,20 @@ react-hotkeys-hook "4.4.3" uuid "9.0.1" -"@avalabs/core-snowtrace-sdk@3.1.0-canary.78916bb.0+78916bb": - version "3.1.0-canary.78916bb.0" - resolved "https://registry.yarnpkg.com/@avalabs/core-snowtrace-sdk/-/core-snowtrace-sdk-3.1.0-canary.78916bb.0.tgz#898acc85dc34c24377658cf05efca27bf67b211e" - integrity sha512-XyFsov84bf70bdP6QLtXqikRmWA6hzI7RTf8tUAN6excaIFCqXZrPZyYNs6DKFVjyzJe8W71xSPFzauh16Uu8A== +"@avalabs/core-snowtrace-sdk@3.1.0-canary.c0d7afa.0": + version "3.1.0-canary.c0d7afa.0" + resolved "https://registry.yarnpkg.com/@avalabs/core-snowtrace-sdk/-/core-snowtrace-sdk-3.1.0-canary.c0d7afa.0.tgz#9502850b8c342170419a2241c98090befda537bc" + integrity sha512-4jCKNvn1vfUE8plWOrpYGZfn8oSif7fxO+mlCo6rtkekH85pl44HxZA9SxfXARjKMuDCyk+xHqNP9qusgNoG/A== dependencies: - "@avalabs/core-utils-sdk" "3.1.0-canary.78916bb.0+78916bb" + "@avalabs/core-utils-sdk" "3.1.0-canary.c0d7afa.0+c0d7afa" -"@avalabs/core-token-prices-sdk@3.1.0-canary.78916bb.0+78916bb": - version "3.1.0-canary.78916bb.0" - resolved "https://registry.yarnpkg.com/@avalabs/core-token-prices-sdk/-/core-token-prices-sdk-3.1.0-canary.78916bb.0.tgz#a7fb97893c97c2867118ef6e5f944adde2cdbc44" - integrity sha512-e4BH3kpXOX72iL/934UxhC7CjtGkET4pS2lN0OsvcL2oYLWwe/HvfTEVaVfsPZUpd9q1d9n1lBEjy8r2XRf3QA== +"@avalabs/core-token-prices-sdk@3.1.0-canary.c0d7afa.0": + version "3.1.0-canary.c0d7afa.0" + resolved "https://registry.yarnpkg.com/@avalabs/core-token-prices-sdk/-/core-token-prices-sdk-3.1.0-canary.c0d7afa.0.tgz#4e4a0dd1b26132d826ae09c2ea845384fa72f3c1" + integrity sha512-LHlLNUBg5E1jYCSPiJzuGbLhaDK9DxPu1GUmQQjgprBz3FNjsWD3PmBtGIaU2QuvQl7Z5ozbFX5qWtlWQMyIww== dependencies: - "@avalabs/core-coingecko-sdk" "3.1.0-canary.78916bb.0+78916bb" - "@avalabs/core-utils-sdk" "3.1.0-canary.78916bb.0+78916bb" + "@avalabs/core-coingecko-sdk" "3.1.0-canary.c0d7afa.0+c0d7afa" + "@avalabs/core-utils-sdk" "3.1.0-canary.c0d7afa.0+c0d7afa" "@avalabs/core-utils-sdk@3.1.0-canary.78916bb.0+78916bb": version "3.1.0-canary.78916bb.0" @@ -170,6 +202,15 @@ "@hpke/core" "1.2.5" is-ipfs "6.0.2" +"@avalabs/core-utils-sdk@3.1.0-canary.c0d7afa.0", "@avalabs/core-utils-sdk@3.1.0-canary.c0d7afa.0+c0d7afa": + version "3.1.0-canary.c0d7afa.0" + resolved "https://registry.yarnpkg.com/@avalabs/core-utils-sdk/-/core-utils-sdk-3.1.0-canary.c0d7afa.0.tgz#ee47a20814f58cf1d8d5ffa269ae7c480abe0bce" + integrity sha512-Y6BaNrc07ZigsocDJA+4eSCpjKr0/y1YibTMPtBufKDeHBHjMgaVwGFfIE53Oj1fBtTsTiLbsT5+RfMlYDLwUQ== + dependencies: + "@avalabs/avalanchejs" "4.1.0-alpha.18" + "@hpke/core" "1.2.5" + is-ipfs "6.0.2" + "@avalabs/core-wallets-sdk@3.1.0-canary.78916bb.0+78916bb": version "3.1.0-canary.78916bb.0" resolved "https://registry.yarnpkg.com/@avalabs/core-wallets-sdk/-/core-wallets-sdk-3.1.0-canary.78916bb.0.tgz#ab1e5510171bc49368fba3cae1382266ad8158af" @@ -194,6 +235,30 @@ ledger-bitcoin "0.2.3" xss "1.0.14" +"@avalabs/core-wallets-sdk@3.1.0-canary.c0d7afa.0", "@avalabs/core-wallets-sdk@3.1.0-canary.c0d7afa.0+c0d7afa": + version "3.1.0-canary.c0d7afa.0" + resolved "https://registry.yarnpkg.com/@avalabs/core-wallets-sdk/-/core-wallets-sdk-3.1.0-canary.c0d7afa.0.tgz#0cb99aa446b02f561d924a72dc0114ef102e7c6f" + integrity sha512-fOxkHdkb98KHEN6vs1zEE8yR97Oqv9beQEtiOo1qsGFwZHAXdAZ5mC/M33X5C7NSdHkJKKy/rbDtNV9hzQiKsQ== + dependencies: + "@avalabs/avalanchejs" "4.1.0-alpha.18" + "@avalabs/core-chains-sdk" "3.1.0-canary.c0d7afa.0+c0d7afa" + "@avalabs/glacier-sdk" "3.1.0-canary.c0d7afa.0+c0d7afa" + "@avalabs/hw-app-avalanche" "0.14.1" + "@ledgerhq/hw-app-btc" "10.2.4" + "@ledgerhq/hw-app-eth" "6.36.1" + "@ledgerhq/hw-transport" "6.30.6" + "@metamask/eth-sig-util" "7.0.2" + "@openzeppelin/contracts" "4.9.6" + bip32 "2.0.6" + bip32-path "0.4.2" + bip39 "3.0.4" + bitcoinjs-lib "5.2.0" + coinselect "3.1.13" + create-hash "1.2.0" + hdkey "2.0.1" + ledger-bitcoin "0.2.3" + xss "1.0.14" + "@avalabs/evm-module@0.0.0-feat-p-dynamic-fees-20241107092624": version "0.0.0-feat-p-dynamic-fees-20241107092624" resolved "https://registry.yarnpkg.com/@avalabs/evm-module/-/evm-module-0.0.0-feat-p-dynamic-fees-20241107092624.tgz#23087cb4d86a600bd354baa89a78011d01f773c3" @@ -219,6 +284,11 @@ resolved "https://registry.yarnpkg.com/@avalabs/glacier-sdk/-/glacier-sdk-3.1.0-canary.78916bb.0.tgz#17969b409fddbeecb842dd5f130a09b13f1f2c8d" integrity sha512-wNuQFi73aIQm54PP3i1YnoKzmVn8aLWS/bOaz0qV0gUcnvrQq02KkBbC7nlm1f+1p1LbdhyOZ613jU6Y6nXO1A== +"@avalabs/glacier-sdk@3.1.0-canary.c0d7afa.0", "@avalabs/glacier-sdk@3.1.0-canary.c0d7afa.0+c0d7afa": + version "3.1.0-canary.c0d7afa.0" + resolved "https://registry.yarnpkg.com/@avalabs/glacier-sdk/-/glacier-sdk-3.1.0-canary.c0d7afa.0.tgz#588dfafc1c4ee4a016f0badbb151fd66c782a04b" + integrity sha512-IOZ62iCfWt8svEpQCSbhaOEoHQnuIBz7loIVEp6Oi4yxKx6MBLRNm62jjCoXEodP6dETNU+gJJr/4LcvVuwpSg== + "@avalabs/hw-app-avalanche@0.14.1": version "0.14.1" resolved "https://registry.yarnpkg.com/@avalabs/hw-app-avalanche/-/hw-app-avalanche-0.14.1.tgz#70b6248e67cf7d64d0640517f88c19632524ac68" @@ -235,6 +305,11 @@ resolved "https://registry.yarnpkg.com/@avalabs/types/-/types-3.1.0-canary.78916bb.0.tgz#3b0d7864fbdbafe7153ea744b95044b9393846f9" integrity sha512-Jjvn47sa0ZjRS/JC6jE9SYTvW4vU2yxAoSai29M/7UB8wij5+g1FpiX6KUci//e0GrQxukqMWMMXZ/5E24h/UQ== +"@avalabs/types@3.1.0-canary.c0d7afa.0": + version "3.1.0-canary.c0d7afa.0" + resolved "https://registry.yarnpkg.com/@avalabs/types/-/types-3.1.0-canary.c0d7afa.0.tgz#be66029a154bbea532a51b533316b9489cf73a5c" + integrity sha512-1MprYg1h/36Kyo4mWkue+Ij1rCGsNTnfaaiv+6cwx5YEJLOhRUdBFp6N8ef4uZge45192lPypTusIJuHy7t/kQ== + "@avalabs/vm-module-types@0.0.0-feat-p-dynamic-fees-20241107092624": version "0.0.0-feat-p-dynamic-fees-20241107092624" resolved "https://registry.yarnpkg.com/@avalabs/vm-module-types/-/vm-module-types-0.0.0-feat-p-dynamic-fees-20241107092624.tgz#3bd50e2bb642814c27b011b6534aa6cc61a4a04c"