diff --git a/package.json b/package.json index 7c1ee1f09..2bb2a009d 100644 --- a/package.json +++ b/package.json @@ -96,7 +96,7 @@ "@reduxjs/toolkit": "^2.2.5", "@scure/bip32": "^1.3.0", "@scure/bip39": "^1.2.0", - "@skip-go/client": "0.10.3", + "@skip-go/client": "0.15.5", "@solana/web3.js": "^1.93.0", "@statsig/js-client": "1.4.0", "@statsig/react-bindings": "1.4.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index decb8d7dc..731a3d6ee 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -153,8 +153,8 @@ dependencies: specifier: ^1.2.0 version: 1.2.1 '@skip-go/client': - specifier: 0.10.3 - version: 0.10.3(@types/react@18.3.3)(react-dom@18.2.0)(react@18.2.0)(typescript@5.6.3) + specifier: 0.15.5 + version: 0.15.5(@solana/web3.js@1.93.2)(@types/react@18.3.3)(react-dom@18.2.0)(react@18.2.0)(starknet@6.11.0)(viem@2.16.2) '@solana/web3.js': specifier: ^1.93.0 version: 1.93.2 @@ -2637,10 +2637,6 @@ packages: - fp-ts dev: false - /@chain-registry/types@0.50.33: - resolution: {integrity: sha512-1zArCjYizFdfbP3L1WCUm3iL7Kf7VBS8N87SEqaTg6rC+fePYsq90LGpFuq2wzNPfQWPT7tsMT22ISeDIYflLA==} - dev: false - /@coinbase/wallet-sdk@3.9.3: resolution: {integrity: sha512-N/A2DRIf0Y3PHc1XAMvbBUu4zisna6qAdqABMZwBMNEfWrXpAwx16pZGkYCLGE+Rvv1edbcB2LYDRnACNcmCiw==} dependencies: @@ -2889,26 +2885,6 @@ packages: '@cosmjs/utils': 0.32.4 dev: false - /@cosmjs/cosmwasm-stargate@0.31.3: - resolution: {integrity: sha512-Uv9TmCn3650gdFeZm7SEfUZF3uX3lfJfFhXOk6I2ZLr/FrKximnlb+vwAfZaZnWYvlA7qrKtHIjeRNHvT23zcw==} - dependencies: - '@cosmjs/amino': 0.31.3 - '@cosmjs/crypto': 0.31.3 - '@cosmjs/encoding': 0.31.3 - '@cosmjs/math': 0.31.3 - '@cosmjs/proto-signing': 0.31.3 - '@cosmjs/stargate': 0.31.3 - '@cosmjs/tendermint-rpc': 0.31.3 - '@cosmjs/utils': 0.31.3 - cosmjs-types: 0.8.0 - long: 4.0.0 - pako: 2.1.0 - transitivePeerDependencies: - - bufferutil - - debug - - utf-8-validate - dev: false - /@cosmjs/cosmwasm-stargate@0.32.4: resolution: {integrity: sha512-Fuo9BGEiB+POJ5WeRyBGuhyKR1ordvxZGLPuPosFJOH9U0gKMgcjwKMCgAlWFkMlHaTB+tNdA8AifWiHrI7VgA==} dependencies: @@ -3222,7 +3198,7 @@ packages: '@cosmjs/socket': 0.32.4 '@cosmjs/stream': 0.32.4 '@cosmjs/utils': 0.32.4 - axios: 1.6.7 + axios: 1.7.7 readonly-date: 1.0.0 xstream: 11.14.0 transitivePeerDependencies: @@ -4449,18 +4425,6 @@ packages: deprecated: Use @eslint/object-schema instead dev: true - /@initia/initia-registry-types@0.0.21: - resolution: {integrity: sha512-bYo0umADPq/qWAXzgISiETtiKj38EInp+CZLcr82Y3YwY4YdmFQvpu1/Tf4HsFGIcHvin4JB2PR03NPpKvOkbg==} - dependencies: - zod: 3.23.8 - dev: false - - /@initia/initia-registry@0.2.1: - resolution: {integrity: sha512-iCGGHy6gDsyJsdAEq7prxl3168POqZmUoIuWibz044oVTWHrfN97rjf5YJEq9XLwKrELkZISynqgEXhlwK7WOw==} - dependencies: - '@initia/initia-registry-types': 0.0.21 - dev: false - /@injectivelabs/core-proto-ts@0.0.21: resolution: {integrity: sha512-RBxSkRBCty60R/l55/D1jsSW0Aof5dyGFhCFdN3A010KjMv/SzZGGr+6DZPY/hflyFeaJzDv/VTopCymKNRBvQ==} dependencies: @@ -4901,15 +4865,6 @@ packages: resolution: {integrity: sha512-wpBYFvd98tIOEnU2wEdA+EileyEUTQwONRF4bZzRz5IPUewhe+sV2VHVFx/Bwps14CcB7Ka/U90LjdTfcPoIGw==} dev: false - /@keplr-wallet/types@0.11.64: - resolution: {integrity: sha512-GgzeLDHHfZFyne3O7UIfFHj/uYqVbxAZI31RbBwt460OBbvwQzjrlZwvJW3vieWRAgxKSITjzEDBl2WneFTQdQ==} - dependencies: - axios: 0.27.2 - long: 4.0.0 - transitivePeerDependencies: - - debug - dev: false - /@keplr-wallet/types@0.12.12: resolution: {integrity: sha512-fo6b8j9EXnJukGvZorifJWEm1BPIrvaTLuu5PqaU5k1ANDasm/FL1NaUuaTBVvhRjINtvVXqYpW/rVUinA9MBA==} dependencies: @@ -4922,6 +4877,15 @@ packages: long: 4.0.0 dev: false + /@keplr-wallet/types@0.12.162(starknet@6.11.0): + resolution: {integrity: sha512-3xZq0xbaAmGWL02HYqYunMENXOaEckWeNpQpfPw2w2f59XDw+HQcruVgJ/2F5a28UUByYTOZDhHwjA2Vod7H8Q==} + peerDependencies: + starknet: ^6 + dependencies: + long: 4.0.0 + starknet: 6.11.0 + dev: false + /@keplr-wallet/unit@0.12.121: resolution: {integrity: sha512-zshS9bd9Y9FJY7d54ZqrUUXY1BAFhD1ClLyeGpeXGk0SSOPPmHk6/j2f14Uk6zUZzb5iAtloBTZ4g2fGdQIiSQ==} dependencies: @@ -4930,6 +4894,16 @@ packages: utility-types: 3.10.0 dev: false + /@keplr-wallet/unit@0.12.162(starknet@6.11.0): + resolution: {integrity: sha512-l/XCTCQTFicnFDQoMl4BPYVmDWVXlZulHe6UPB1yaisK4hi2HpC56AuY0UNNecwCbRu3ztVJJdC+Ht9G2AJbfA==} + dependencies: + '@keplr-wallet/types': 0.12.162(starknet@6.11.0) + big-integer: 1.6.52 + utility-types: 3.10.0 + transitivePeerDependencies: + - starknet + dev: false + /@ladle/react-context@1.0.1(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-xVQ8siyOEQG6e4Knibes1uA3PTyXnqiMmfSmd5pIbkzeDty8NCBtYHhTXSlfmcDNEsw/G8OzNWo4VbyQAVDl2A==} peerDependencies: @@ -5503,6 +5477,12 @@ packages: '@noble/hashes': 1.3.2 dev: false + /@noble/curves@1.3.0: + resolution: {integrity: sha512-t01iSXPuN+Eqzb4eBX0S5oubSqXbK/xXa1Ne18Hj8f9pStxztHCE2gfboSp/dZRLSqfuLpRK2nDXDK+W9puocA==} + dependencies: + '@noble/hashes': 1.3.3 + dev: false + /@noble/curves@1.4.0: resolution: {integrity: sha512-p+4cb332SFCrReJkCYe8Xzm0OWi4Jji5jVdIZRL/PmacmDkFNw6MrrV+gGpiPxLHbV+zKFRywUWbaseT+tZRXg==} dependencies: @@ -9407,6 +9387,13 @@ packages: '@scure/base': 1.1.9 dev: false + /@scure/starknet@1.0.0: + resolution: {integrity: sha512-o5J57zY0f+2IL/mq8+AYJJ4Xpc1fOtDhr+mFQKbHnYFmm3WQrC+8zj2HEgxak1a+x86mhmBC1Kq305KUpVf0wg==} + dependencies: + '@noble/curves': 1.3.0 + '@noble/hashes': 1.3.3 + dev: false + /@sentry/core@5.30.0: resolution: {integrity: sha512-TmfrII8w1PQZSZgPpUESqjB+jC6MvZJZdLtE/0hZ+SrnKhW3x5WlYLvTXZpcWePYBku7rl2wn1RZu6uT0qCTeg==} engines: {node: '>=6'} @@ -9526,8 +9513,11 @@ packages: '@sinonjs/commons': 3.0.1 dev: false - /@skip-go/client@0.10.3(@types/react@18.3.3)(react-dom@18.2.0)(react@18.2.0)(typescript@5.6.3): - resolution: {integrity: sha512-7sA4abXuIB8bHYcM/cdUKqWOsduVq3ORrIehRGgZOJdQsztYEnsrUdqGCtN4PLuPc9VIlXhAXueejiaySAGjig==} + /@skip-go/client@0.15.5(@solana/web3.js@1.93.2)(@types/react@18.3.3)(react-dom@18.2.0)(react@18.2.0)(starknet@6.11.0)(viem@2.16.2): + resolution: {integrity: sha512-BYTCO/SSYhXJjzChVwPge/U2TctxGd8g3JSN0HNbLVkUnj3g5bXvsOL+WB/bQQ0D/4K+1tVQVJs3r98HDxzCxw==} + peerDependencies: + '@solana/web3.js': ^1.95.8 + viem: 2.x dependencies: '@cosmjs/amino': 0.32.4 '@cosmjs/cosmwasm-stargate': 0.32.4 @@ -9536,30 +9526,26 @@ packages: '@cosmjs/proto-signing': 0.32.4 '@cosmjs/stargate': 0.32.4 '@cosmjs/tendermint-rpc': 0.32.4 - '@initia/initia-registry': 0.2.1 '@injectivelabs/core-proto-ts': 0.0.21 '@injectivelabs/sdk-ts': 1.14.5(@types/react@18.3.3)(react-dom@18.2.0)(react@18.2.0) - '@keplr-wallet/unit': 0.12.121 + '@keplr-wallet/unit': 0.12.162(starknet@6.11.0) '@solana/wallet-adapter-base': 0.9.23(@solana/web3.js@1.93.2) '@solana/web3.js': 1.93.2 - axios: 1.6.7 - chain-registry: 1.69.59 - cosmjs-types: 0.8.0 - keccak256: 1.0.6 - kujira.js: 0.9.162 + axios: 1.7.7 + cosmjs-types: 0.9.0 + create-hash: 1.2.0 + keccak: 3.0.4 viem: 2.16.2(typescript@5.6.3) transitivePeerDependencies: - '@types/react' - bufferutil - debug - - encoding - graphql-ws - react - react-dom + - starknet - subscriptions-transport-ws - - typescript - utf-8-validate - - zod dev: false /@smithy/abort-controller@3.1.5: @@ -10123,6 +10109,10 @@ packages: '@stablelib/wipe': 1.0.1 dev: false + /@starknet-io/types-js@0.7.10: + resolution: {integrity: sha512-1VtCqX4AHWJlRRSYGSn+4X1mqolI1Tdq62IwzoU2vUuEE72S1OlEeGhpvd6XsdqXcfHmVzYfj8k1XtKBQqwo9w==} + dev: false + /@statsig/client-core@1.4.0: resolution: {integrity: sha512-ICz/4DyjMhp9H5GwLTrVUzWqfrO6Bm0RFx1wDd+KGnYx9g6Iwu3FKny5FRybnPSKW47jWidc+FpUi2kQ5AGPqw==} dev: false @@ -10713,10 +10703,6 @@ packages: resolution: {integrity: sha512-W6hyZux6TrtKfF2I9XNLVcsFr4xRr0T+S6hrJ9nDkhA2vzsFPIEAbnY4vgb6v2yKXQ9MJVcbLsARNlMfg4EVtQ==} dev: true - /@types/google-protobuf@3.15.12: - resolution: {integrity: sha512-40um9QqwHjRS92qnOaDpL7RmDK15NuZYo9HihiJRbYkMQZlWnuH8AdvbMy8/o6lgLmKbDUKa+OALCltHdbOTpQ==} - dev: false - /@types/hast@3.0.4: resolution: {integrity: sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ==} dependencies: @@ -12885,6 +12871,16 @@ packages: jsonparse: 1.3.1 through: 2.3.8 + /abi-wan-kanabi@2.2.3: + resolution: {integrity: sha512-JlqiAl9CPvTm5kKG0QXmVCWNWoC/XyRMOeT77cQlbxXWllgjf6SqUmaNqFon72C2o5OSZids+5FvLdsw6dvWaw==} + hasBin: true + dependencies: + ansicolors: 0.3.2 + cardinal: 2.1.1 + fs-extra: 10.1.0 + yargs: 17.7.2 + dev: false + /abitype@0.10.3(typescript@5.6.3): resolution: {integrity: sha512-tRN+7XIa7J9xugdbRzFv/95ka5ivR/sRe01eiWvM0HWWjHuigSZEACgKa0sj4wGuekTDtghCx+5Izk/cOi78pQ==} peerDependencies: @@ -13136,6 +13132,10 @@ packages: resolution: {integrity: sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==} engines: {node: '>=12'} + /ansicolors@0.3.2: + resolution: {integrity: sha512-QXu7BPrP29VllRxH8GwB7x5iX5qWKAAMLqKQGWTeLWVlNHNOpVMJ91dsxQAIWXpjuW5wqvxu3Jd/nRjrJ+0pqg==} + dev: false + /any-promise@1.3.0: resolution: {integrity: sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==} @@ -14161,6 +14161,14 @@ packages: multiformats: 9.9.0 dev: true + /cardinal@2.1.1: + resolution: {integrity: sha512-JSr5eOgoEymtYHBjNWyjrMqet9Am2miJhlfKNdqLp6zoeAh0KN5dRAcxlecj5mAJrmQomgiOBj35xHLrFjqBpw==} + hasBin: true + dependencies: + ansicolors: 0.3.2 + redeyed: 2.1.1 + dev: false + /cbor-web@8.1.0: resolution: {integrity: sha512-2hWHHMVrfffgoEmsAUh8vCxHoLa1vgodtC73+C5cSarkJlwTapnqAzcHINlP6Ej0DXuP4OmmJ9LF+JaNM5Lj/g==} engines: {node: '>=12.19'} @@ -14188,12 +14196,6 @@ packages: type-detect: 4.1.0 dev: true - /chain-registry@1.69.59: - resolution: {integrity: sha512-8NUDiFtgXJAOpFTGwAnBzps3Kfn/tlvLNVZ8W6J/5JbGf7R8ZSSeuMM+g8xm1toI7nbjgzN1HDGh/VjazVbbQw==} - dependencies: - '@chain-registry/types': 0.50.33 - dev: false - /chalk@2.4.2: resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==} engines: {node: '>=4'} @@ -16539,7 +16541,7 @@ packages: create-hash: 1.2.0 create-hmac: 1.1.7 hash.js: 1.1.7 - keccak: 3.0.3 + keccak: 3.0.4 pbkdf2: 3.1.2 randombytes: 2.1.0 safe-buffer: 5.2.1 @@ -16568,6 +16570,7 @@ packages: /ethereumjs-abi@0.6.8: resolution: {integrity: sha512-Tx0r/iXI6r+lRsdvkFDlut0N08jWMnKRZ6Gkq+Nmw75lZe4e6o3EkSnkaBP5NF6+m5PTGAr9JP43N3LyeoglsA==} + deprecated: This library has been deprecated and usage is discouraged. dependencies: bn.js: 4.12.0 ethereumjs-util: 6.2.1 @@ -16953,6 +16956,13 @@ packages: web-streams-polyfill: 3.2.1 dev: true + /fetch-cookie@3.0.1: + resolution: {integrity: sha512-ZGXe8Y5Z/1FWqQ9q/CrJhkUD73DyBU9VF0hBQmEO/wPHe4A9PKTjplFDLeFX8aOsYypZUcX5Ji/eByn3VCVO3Q==} + dependencies: + set-cookie-parser: 2.6.0 + tough-cookie: 4.1.4 + dev: false + /fetch-retry@5.0.6: resolution: {integrity: sha512-3yurQZ2hD9VISAhJJP9bpYFNQrHHBXE2JxxjY5aLEcDi46RmAzJE2OC9FAde0yis5ElW0jTTzs0zfg/Cca4XqQ==} dev: false @@ -17188,6 +17198,15 @@ packages: resolution: {integrity: sha512-twe20eF1OxVxp/ML/kq2p1uc6KvFK/+vs8WjEbeKmV2He22MKm7YF2ANIt+EOqhJ5L3K/SuuPhk0hWQDjOM23g==} dev: true + /fs-extra@10.1.0: + resolution: {integrity: sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==} + engines: {node: '>=12'} + dependencies: + graceful-fs: 4.2.11 + jsonfile: 6.1.0 + universalify: 2.0.1 + dev: false + /fs-extra@11.2.0: resolution: {integrity: sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==} engines: {node: '>=14.14'} @@ -17324,6 +17343,12 @@ packages: engines: {node: '>=16'} dev: true + /get-starknet-core@4.0.0: + resolution: {integrity: sha512-6pLmidQZkC3wZsrHY99grQHoGpuuXqkbSP65F8ov1/JsEI8DDLkhsAuLCKFzNOK56cJp+f1bWWfTJ57e9r5eqQ==} + dependencies: + '@starknet-io/types-js': 0.7.10 + dev: false + /get-stream@5.2.0: resolution: {integrity: sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==} engines: {node: '>=8'} @@ -18978,6 +19003,15 @@ packages: engines: {node: '>=0.10.0'} dev: false + /isomorphic-fetch@3.0.0: + resolution: {integrity: sha512-qvUtwJ3j6qwsF3jLxkZ72qCgjMysPzDfeV240JHiGZsANBYd+EEuu35v7dfrJ9Up0Ak07D7GGSkGhCHTqg/5wA==} + dependencies: + node-fetch: 2.7.0(encoding@0.1.13) + whatwg-fetch: 3.6.20 + transitivePeerDependencies: + - encoding + dev: false + /isomorphic-timers-promises@1.0.1: resolution: {integrity: sha512-u4sej9B1LPSxTGKB/HiuzvEQnXH0ECYkSVQU39koSwmFAxhlEAFl9RdTvLv4TOTQUgBS5O3O5fwUxk6byBZ+IQ==} engines: {node: '>=10'} @@ -19484,7 +19518,6 @@ packages: universalify: 2.0.1 optionalDependencies: graceful-fs: 4.2.11 - dev: true /jsonparse@1.3.1: resolution: {integrity: sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg==} @@ -19509,7 +19542,7 @@ packages: dependencies: bn.js: 5.2.1 buffer: 6.0.3 - keccak: 3.0.3 + keccak: 3.0.4 dev: false /keccak@3.0.3: @@ -19522,6 +19555,16 @@ packages: readable-stream: 3.6.2 dev: false + /keccak@3.0.4: + resolution: {integrity: sha512-3vKuW0jV8J3XNTzvfyicFR5qvxrSAGl7KIhvgOu5cmWwM7tZRj3fMbj/pfIf4be7aznbc+prBWGjywox/g2Y6Q==} + engines: {node: '>=10.0.0'} + requiresBuild: true + dependencies: + node-addon-api: 2.0.2 + node-gyp-build: 4.6.0 + readable-stream: 3.6.2 + dev: false + /keygrip@1.1.0: resolution: {integrity: sha512-iYSchDJ+liQ8iwbSI2QqsQOvqv58eJCEanyJPJi+Khyu8smkcKSFUCbPwzFcL7YVtZ6eONjqRX/38caJ7QjRAQ==} engines: {node: '>= 0.6'} @@ -19595,26 +19638,6 @@ packages: - supports-color dev: true - /kujira.js@0.9.162: - resolution: {integrity: sha512-zhH6baskDKn5OPIkYY9db+2poaFQ6cJ+gyN5EcKd1Bo7SYCR6HtIFG+FQrfkVG/Hy4UBW/RBNRbuqgNuWgYcTg==} - dependencies: - '@cosmjs/cosmwasm-stargate': 0.31.3 - '@cosmjs/launchpad': 0.27.1 - '@cosmjs/stargate': 0.31.3 - '@ethersproject/bignumber': 5.7.0 - '@keplr-wallet/types': 0.11.64 - '@types/google-protobuf': 3.15.12 - chain-registry: 1.69.59 - cosmjs-types: 0.8.0 - long: 4.0.0 - text-encoding: 0.7.0 - yarn: 1.22.22 - transitivePeerDependencies: - - bufferutil - - debug - - utf-8-validate - dev: false - /ky@0.33.3: resolution: {integrity: sha512-CasD9OCEQSFIam2U8efFK81Yeg8vNMTBUqtMOHlrcWQHqUX3HeCl9Dr31u4toV7emlH8Mymk5+9p0lL6mKb/Xw==} engines: {node: '>=14.16'} @@ -19998,6 +20021,10 @@ packages: dependencies: js-tokens: 4.0.0 + /lossless-json@4.0.2: + resolution: {integrity: sha512-+z0EaLi2UcWi8MZRxA5iTb6m4Ys4E80uftGY+yG5KNFJb5EceQXOhdW/pWJZ8m97s26u7yZZAYMcKWNztSZssA==} + dev: false + /loupe@2.3.7: resolution: {integrity: sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==} dependencies: @@ -23337,6 +23364,12 @@ packages: strip-indent: 3.0.0 dev: true + /redeyed@2.1.1: + resolution: {integrity: sha512-FNpGGo1DycYAdnrKFxCMmKYgo/mILAqtRYbkdQD8Ep/Hk2PQ5+aEAEx+IU713RTDmuBaH0c8P5ZozurNu5ObRQ==} + dependencies: + esprima: 4.0.1 + dev: false + /redis-errors@1.2.0: resolution: {integrity: sha512-1qny3OExCf0UvUV/5wpYKf2YwPcOqXzkwKKSmKHiE6ZMQs5heeE/c8eXK+PNllPvmjgAbfnsbpkGZWy8cBpn9w==} engines: {node: '>=4'} @@ -24363,6 +24396,26 @@ packages: resolution: {integrity: sha512-qoRRSyROncaz1z0mvYqIE4lCd9p2R90i6GxW3uZv5ucSu8tU7B5HXUP1gG8pVZsYNVaXjk8ClXHPttLyxAL48A==} dev: false + /starknet@6.11.0: + resolution: {integrity: sha512-u50KrGDi9fbu1Ogu7ynwF/tSeFlp3mzOg1/Y5x50tYFICImo3OfY4lOz9OtYDk404HK4eUujKkhov9tG7GAKlg==} + dependencies: + '@noble/curves': 1.4.0 + '@noble/hashes': 1.4.0 + '@scure/base': 1.1.9 + '@scure/starknet': 1.0.0 + abi-wan-kanabi: 2.2.3 + fetch-cookie: 3.0.1 + get-starknet-core: 4.0.0 + isomorphic-fetch: 3.0.0 + lossless-json: 4.0.2 + pako: 2.1.0 + starknet-types-07: /@starknet-io/types-js@0.7.10 + ts-mixer: 6.0.4 + url-join: 4.0.1 + transitivePeerDependencies: + - encoding + dev: false + /statuses@1.5.0: resolution: {integrity: sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==} engines: {node: '>= 0.6'} @@ -24845,11 +24898,6 @@ packages: resolution: {integrity: sha512-8bw4MY9WjdsD2aMtO0OzOCY3pXGYNx2d2FfHRVUKkiCPDWjKuOlhLVASS+pD7VkLTVjW268LYJHwsnPFlBpbAg==} dev: false - /text-encoding@0.7.0: - resolution: {integrity: sha512-oJQ3f1hrOnbRLOcwKz0Liq2IcrvDeZRHXhd9RgLrsT+DjWY/nty1Hi7v3dtkaEYbPYe0mUoOfzRrMwfXXwgPUA==} - deprecated: no longer maintained - dev: false - /text-extensions@2.4.0: resolution: {integrity: sha512-te/NtwBwfiNRLf9Ijqx3T0nlqZiQ2XrrtBvu+cLL8ZRrGkO0NHTug8MYFKyoSrv/sHTaSKfilUkizV6XhxMJ3g==} engines: {node: '>=8'} @@ -25050,6 +25098,10 @@ packages: tslib: 2.6.2 dev: false + /ts-mixer@6.0.4: + resolution: {integrity: sha512-ufKpbmrugz5Aou4wcr5Wc1UUFWOLhq+Fm6qa6P0w0K5Qw2yhaUoiWszhCVuNQyNwrlGiscHOmqYoAox1PtvgjA==} + dev: false + /ts-node@10.9.2(@types/node@20.12.13)(typescript@5.6.3): resolution: {integrity: sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==} hasBin: true @@ -25482,7 +25534,6 @@ packages: resolution: {integrity: sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==} engines: {node: '>= 10.0.0'} requiresBuild: true - dev: true /unpipe@1.0.0: resolution: {integrity: sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==} @@ -25589,6 +25640,10 @@ packages: punycode: 2.3.1 dev: true + /url-join@4.0.1: + resolution: {integrity: sha512-jk1+QP6ZJqyOiuEI9AEWQfju/nB2Pw466kbA0LEZljHwKeMgd9WrAEgEGxjPDD2+TNbbb37rTyhEfrCXfuKXnA==} + dev: false + /url-parse@1.5.10: resolution: {integrity: sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==} dependencies: @@ -27022,13 +27077,6 @@ packages: y18n: 5.0.8 yargs-parser: 21.1.1 - /yarn@1.22.22: - resolution: {integrity: sha512-prL3kGtyG7o9Z9Sv8IPfBNrWTDmXB4Qbes8A9rEzt6wkJV8mUvoirjU0Mp3GGAU06Y0XQyA3/2/RQFVuK7MTfg==} - engines: {node: '>=4.0.0'} - hasBin: true - requiresBuild: true - dev: false - /yauzl@2.10.0: resolution: {integrity: sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==} requiresBuild: true diff --git a/src/App.tsx b/src/App.tsx index 3b6b430b4..3adea2af5 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -46,6 +46,7 @@ import { RestrictionWarning } from './components/RestrictionWarning'; import { DialogTypes } from './constants/dialogs'; import { funkitConfig, funkitTheme } from './constants/funkit'; import { LocalStorageKey } from './constants/localStorage'; +import { SkipProvider } from './hooks/transfers/skipClient'; import { useAnalytics } from './hooks/useAnalytics'; import { useBreakpoints } from './hooks/useBreakpoints'; import { useCommandMenu } from './hooks/useCommandMenu'; @@ -226,6 +227,7 @@ const providers = [ wrapProvider(DydxProvider), wrapProvider(AccountsProvider), wrapProvider(SubaccountProvider), + wrapProvider(SkipProvider), wrapProvider(LocalNotificationsProvider), wrapProvider(NotificationsProvider), wrapProvider(DialogAreaProvider), diff --git a/src/constants/dialogs.ts b/src/constants/dialogs.ts index 28c3018af..15b8c5f44 100644 --- a/src/constants/dialogs.ts +++ b/src/constants/dialogs.ts @@ -85,6 +85,7 @@ export type UnlimitedAnnouncementDialogProps = {}; export type UnstakeDialogProps = {}; export type VaultDepositWithdrawDialogProps = { initialType?: 'DEPOSIT' | 'WITHDRAW' }; export type WithdrawDialogProps = {}; +export type DepositDialog2Props = {}; export type WithdrawalGatedDialogProps = { transferType: 'withdrawal' | 'transfer'; estimatedUnblockTime?: string | null; @@ -108,6 +109,8 @@ export const DialogTypes = unionize( ConfirmPendingDeposit: ofType(), Criteria: ofType(), Deposit: ofType(), + /* TODO: rename Deposit2 to Deposit once old deposit flow is deprecated */ + Deposit2: ofType(), DisconnectWallet: ofType(), DisplaySettings: ofType(), ExchangeOffline: ofType(), diff --git a/src/hooks/transfers/skipClient.tsx b/src/hooks/transfers/skipClient.tsx index b458ee9c9..d922662ed 100644 --- a/src/hooks/transfers/skipClient.tsx +++ b/src/hooks/transfers/skipClient.tsx @@ -32,10 +32,7 @@ const useSkipClientContext = () => { useEndpointsConfig(); const { compositeClient } = useDydxClient(); const selectedDydxChainId = useAppSelector(getSelectedDydxChainId); - // reactQuery only accepts serializable objects/values, so we return a string id - // so any useQuery that uses the skipClient can use that id as a query key - // to ensure it has the most up-to-date skipClient - const { skipClient, skipClientId } = useMemo( + const { skipClient, skipInstanceId } = useMemo( () => ({ skipClient: new SkipClient({ endpointOptions: { @@ -53,7 +50,7 @@ const useSkipClientContext = () => { }, registryTypes: [[TYPE_URL_MSG_WITHDRAW_FROM_SUBACCOUNT, MsgWithdrawFromSubaccount]], }), - skipClientId: crypto.randomUUID(), + skipInstanceId: crypto.randomUUID(), }), [ compositeClient?.network.validatorConfig.restEndpoint, @@ -65,5 +62,5 @@ const useSkipClientContext = () => { validators, ] ); - return { skipClient, skipClientId }; + return { skipClient, skipInstanceId }; }; diff --git a/src/hooks/transfers/useTransfers.tsx b/src/hooks/transfers/useTransfers.tsx index 637d9531b..a4263591f 100644 --- a/src/hooks/transfers/useTransfers.tsx +++ b/src/hooks/transfers/useTransfers.tsx @@ -65,7 +65,7 @@ export const assetsQueryFn = async (skipClient: SkipClient) => { }; export const useTransfers = () => { - const { skipClient, skipClientId } = useSkipClient(); + const { skipClient } = useSkipClient(); const { dydxAddress, sourceAccount } = useAccounts(); const selectedDydxChainId = useAppSelector(getSelectedDydxChainId); @@ -87,14 +87,14 @@ export const useTransfers = () => { const debouncedAmountBN = useMemo(() => MustBigNumber(debouncedAmount), [debouncedAmount]); const chainsQuery = useQuery({ - queryKey: ['transferEligibleChains', skipClientId], + queryKey: ['transferEligibleChains'], queryFn: () => chainsQueryFn(skipClient), refetchOnWindowFocus: false, refetchOnMount: false, refetchOnReconnect: false, }); const assetsQuery = useQuery({ - queryKey: ['transferEligibleAssets', skipClientId], + queryKey: ['transferEligibleAssets'], queryFn: () => assetsQueryFn(skipClient), refetchOnWindowFocus: false, refetchOnMount: false, diff --git a/src/hooks/usePrefetchedQueries.ts b/src/hooks/usePrefetchedQueries.ts index 960352888..350f70d60 100644 --- a/src/hooks/usePrefetchedQueries.ts +++ b/src/hooks/usePrefetchedQueries.ts @@ -2,19 +2,23 @@ import { useEffect } from 'react'; import { appQueryClient } from '@/state/appQueryClient'; +import { testFlags } from '@/lib/testFlags'; + import { useSkipClient } from './transfers/skipClient'; import { assetsQueryFn, chainsQueryFn } from './transfers/useTransfers'; export const usePrefetchedQueries = () => { - const { skipClient, skipClientId } = useSkipClient(); + const { skipClient } = useSkipClient(); useEffect(() => { + if (!testFlags.showNewDepositFlow) return; + appQueryClient.prefetchQuery({ - queryKey: ['transferEligibleChains', skipClientId], + queryKey: ['transferEligibleChains'], queryFn: () => chainsQueryFn(skipClient), }); appQueryClient.prefetchQuery({ - queryKey: ['transferEligibleAssets', skipClientId], + queryKey: ['transferEligibleAssets'], queryFn: () => assetsQueryFn(skipClient), }); - }, [skipClient, skipClientId]); + }, [skipClient]); }; diff --git a/src/layout/DialogManager.tsx b/src/layout/DialogManager.tsx index d9dd3c5bd..ce4d7bbe8 100644 --- a/src/layout/DialogManager.tsx +++ b/src/layout/DialogManager.tsx @@ -14,6 +14,7 @@ import { ClosePositionDialog } from '@/views/dialogs/ClosePositionDialog'; import { ComplianceConfigDialog } from '@/views/dialogs/ComplianceConfigDialog'; import { ConfirmPendingDepositDialog } from '@/views/dialogs/ConfirmPendingDepositDialog'; import { DepositDialog } from '@/views/dialogs/DepositDialog'; +import { DepositDialog2 } from '@/views/dialogs/DepositDialog2/DepositDialog2'; import { FillDetailsDialog } from '@/views/dialogs/DetailsDialog/FillDetailsDialog'; import { OrderDetailsDialog } from '@/views/dialogs/DetailsDialog/OrderDetailsDialog'; import { DisconnectDialog } from '@/views/dialogs/DisconnectDialog'; @@ -81,6 +82,7 @@ export const DialogManager = React.memo(() => { ComplianceConfig: (args) => , ConfirmPendingDeposit: (args) => , Deposit: (args) => , + Deposit2: (args) => , DisconnectWallet: (args) => , DisplaySettings: (args) => , ExchangeOffline: (args) => , diff --git a/src/layout/Header/HeaderDesktop.tsx b/src/layout/Header/HeaderDesktop.tsx index b8ca7b5ba..bed64d4f6 100644 --- a/src/layout/Header/HeaderDesktop.tsx +++ b/src/layout/Header/HeaderDesktop.tsx @@ -40,6 +40,7 @@ import { openDialog } from '@/state/dialogs'; import { isTruthy } from '@/lib/isTruthy'; import { MustBigNumber } from '@/lib/numbers'; +import { testFlags } from '@/lib/testFlags'; export const HeaderDesktop = () => { const stringGetter = useStringGetter(); @@ -195,7 +196,15 @@ export const HeaderDesktop = () => { ? ButtonAction.Secondary : ButtonAction.Primary } - onClick={() => dispatch(openDialog(DialogTypes.Deposit({})))} + onClick={() => { + dispatch( + openDialog( + testFlags.showNewDepositFlow + ? DialogTypes.Deposit2({}) + : DialogTypes.Deposit({}) + ) + ); + }} state={{ isDisabled: !dydxAccounts }} > {stringGetter({ key: STRING_KEYS.DEPOSIT })} diff --git a/src/lib/testFlags.ts b/src/lib/testFlags.ts index d7972c798..46ba5cbc5 100644 --- a/src/lib/testFlags.ts +++ b/src/lib/testFlags.ts @@ -59,6 +59,10 @@ class TestFlags { get showInstantDepositToggle() { return !!this.queryParams.funkit_toggle; } + + get showNewDepositFlow() { + return !!this.queryParams.deposit_rewrite; + } } export const testFlags = new TestFlags(); diff --git a/src/views/dialogs/DepositDialog2/DepositDialog2.tsx b/src/views/dialogs/DepositDialog2/DepositDialog2.tsx new file mode 100644 index 000000000..95280c5e1 --- /dev/null +++ b/src/views/dialogs/DepositDialog2/DepositDialog2.tsx @@ -0,0 +1,24 @@ +import { DepositDialog2Props, DialogProps } from '@/constants/dialogs'; +import { STRING_KEYS } from '@/constants/localization'; + +import { useBreakpoints } from '@/hooks/useBreakpoints'; +import { useStringGetter } from '@/hooks/useStringGetter'; + +import { Dialog, DialogPlacement } from '@/components/Dialog'; + +export const DepositDialog2 = ({ setIsOpen }: DialogProps) => { + const { isMobile } = useBreakpoints(); + const stringGetter = useStringGetter(); + + return ( + + New deposit flow goes here! + + ); +};