@embarkai/ui-kit 0.4.73 → 0.4.74
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/iframe/index.html +1 -1
- package/dist/iframe/main.js +1 -1
- package/dist/index.cjs +1077 -615
- package/dist/index.d.cts +224 -8
- package/dist/index.d.ts +224 -8
- package/dist/index.js +1050 -591
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5544,6 +5544,12 @@ var init_en = __esm({
|
|
|
5544
5544
|
selectNone: "Select None",
|
|
5545
5545
|
errors: {
|
|
5546
5546
|
oops: "Oops, something went wrong. Please try again."
|
|
5547
|
+
},
|
|
5548
|
+
onboarding: {
|
|
5549
|
+
tourButton: {
|
|
5550
|
+
title: "Tour Button",
|
|
5551
|
+
description: 'Tours are available under the "?" buttons of embarkAI menus. Click to have menu tour'
|
|
5552
|
+
}
|
|
5547
5553
|
}
|
|
5548
5554
|
},
|
|
5549
5555
|
auth: {
|
|
@@ -5596,22 +5602,31 @@ var init_en = __esm({
|
|
|
5596
5602
|
actions: {
|
|
5597
5603
|
send: "SEND",
|
|
5598
5604
|
confirm: "CONFIRM SEND"
|
|
5605
|
+
},
|
|
5606
|
+
onboarding: {
|
|
5607
|
+
sendMenu: {
|
|
5608
|
+
title: "Send Menu",
|
|
5609
|
+
description: "Select a crypto asset to send and enter the recipient address and amount."
|
|
5610
|
+
},
|
|
5611
|
+
sendCryptoSummary: {
|
|
5612
|
+
title: "Send Summary",
|
|
5613
|
+
description: "Review the details of your crypto transfer before confirming, then confirm the transaction."
|
|
5614
|
+
}
|
|
5599
5615
|
}
|
|
5600
5616
|
},
|
|
5601
5617
|
bridgeMenu: {
|
|
5602
|
-
title: "Bridge
|
|
5618
|
+
title: "Bridge asset",
|
|
5603
5619
|
labels: {
|
|
5604
|
-
sender: "Sender",
|
|
5605
5620
|
bridgeAsset: "Bridge {{asset}}",
|
|
5606
|
-
|
|
5607
|
-
selectToken: "Select
|
|
5621
|
+
selectSender: "Select sender wallet",
|
|
5622
|
+
selectToken: "Select asset for bridging",
|
|
5608
5623
|
estimations: "Estimations",
|
|
5609
5624
|
estimatedFee: "Estimated Fee",
|
|
5610
|
-
availableChainPairs: "Select
|
|
5611
|
-
toChain: "To
|
|
5612
|
-
fromChain: "From
|
|
5625
|
+
availableChainPairs: "Select chain pair",
|
|
5626
|
+
toChain: "To chain",
|
|
5627
|
+
fromChain: "From chain",
|
|
5613
5628
|
optionalRecipient: "Recipient (optional, if empty - destination chain address = sender address on origin chain)",
|
|
5614
|
-
confirm: "Confirm
|
|
5629
|
+
confirm: "Confirm bridge",
|
|
5615
5630
|
bridgeTransactions: "Bridge TXs"
|
|
5616
5631
|
},
|
|
5617
5632
|
quote: {
|
|
@@ -5628,6 +5643,7 @@ var init_en = __esm({
|
|
|
5628
5643
|
},
|
|
5629
5644
|
actions: {
|
|
5630
5645
|
connectWallet: "CONNECT WALLET",
|
|
5646
|
+
addExternalWalletProfile: "ADD WALLET PROFILE",
|
|
5631
5647
|
bridge: "BRIDGE",
|
|
5632
5648
|
estimateQuote: "ESTIMATE QUOTE",
|
|
5633
5649
|
bridgeAsset: "BRIDGE {{asset}}",
|
|
@@ -5652,7 +5668,37 @@ var init_en = __esm({
|
|
|
5652
5668
|
noConnections: "No connections found between {{originChain}} & {{destinationChain}}",
|
|
5653
5669
|
wrongNetwork: " Please switch embarkAi to origin chain to proceed with bridging",
|
|
5654
5670
|
noHistory: "No bridge history yet. Bridge your assets to see the history here.",
|
|
5655
|
-
unsupportedNetwork:
|
|
5671
|
+
unsupportedNetwork: 'Bridging from {{originChain}} not yet possible by {{sender}}. Try swapping network pair, or select different token route, or change sender wallet, or if sender is embarkAI make sure it is switched to the corresponding "From Chain" network.'
|
|
5672
|
+
},
|
|
5673
|
+
onboarding: {
|
|
5674
|
+
bridgeMenu: {
|
|
5675
|
+
title: "Bridge Menu",
|
|
5676
|
+
description: "Sending via Bridging provides a way to send crypto assets across different blockchain networks."
|
|
5677
|
+
},
|
|
5678
|
+
bridgeSenderWalletSelector: {
|
|
5679
|
+
title: "Select sender wallet",
|
|
5680
|
+
description: "EmbarkAI can be authenticated by external wallet as auth-profile provider (Settings -> Profiles).\n External wallet profile can be used as sender (tx signer) for bridging crypto into embarkAI.\n Add external wallet profile if not done yet (Settings -> Profiles) and proceed with provided instructions"
|
|
5681
|
+
},
|
|
5682
|
+
bridgeCryptoAssetSelector: {
|
|
5683
|
+
title: "Select asset to bridge",
|
|
5684
|
+
description: "Bridging happens from one blockchain network to another.\n With this selector pick the asset you want to bridge, then pick the chain pair from available for the asset."
|
|
5685
|
+
},
|
|
5686
|
+
bridgeChainPairSwapper: {
|
|
5687
|
+
title: "Set origin & destination chains for bridging",
|
|
5688
|
+
description: 'Bridge route (chain pair) is used to be bidirectional, meaning that the origin and destination chains can be swapped.\n Use the "\u21C4" button to set the origin and destination chains for bridging.'
|
|
5689
|
+
},
|
|
5690
|
+
bridgeAmountRecipientInputs: {
|
|
5691
|
+
title: "Set amount & optional recipient for bridging",
|
|
5692
|
+
description: "Enter the amount you want to bridge and optionally specify a recipient address. If recipient is empty: destination chain address = sender address on origin chain"
|
|
5693
|
+
},
|
|
5694
|
+
bridgeEstimateQuoteButton: {
|
|
5695
|
+
title: "Estimate quote for bridging",
|
|
5696
|
+
description: "'Get an estimation of the bridging transaction before actual bridging. This helps you make an informed decision before proceeding with the bridge.'"
|
|
5697
|
+
},
|
|
5698
|
+
bridgeEstimatedQuoteMenu: {
|
|
5699
|
+
title: "Estimated bridging quote",
|
|
5700
|
+
description: "Make sure to check bridge setup & the estimated quote for bridging, then confirm the transaction."
|
|
5701
|
+
}
|
|
5656
5702
|
}
|
|
5657
5703
|
},
|
|
5658
5704
|
receiveMenu: {
|
|
@@ -5701,6 +5747,24 @@ var init_en = __esm({
|
|
|
5701
5747
|
inputPlaceholder: {
|
|
5702
5748
|
selectCurrencies: "Select crypto and fiat",
|
|
5703
5749
|
providerMin: "{{provider}}: Minimum {{minimum}} {{currency}} required"
|
|
5750
|
+
},
|
|
5751
|
+
onboarding: {
|
|
5752
|
+
buyMenu: {
|
|
5753
|
+
title: "Buy Menu",
|
|
5754
|
+
description: "Here you can make crypto purchases."
|
|
5755
|
+
},
|
|
5756
|
+
providerSelector: {
|
|
5757
|
+
title: "Select a Provider",
|
|
5758
|
+
description: "Cick here to choose a provider for your crypto purchase."
|
|
5759
|
+
},
|
|
5760
|
+
binanceMenu: {
|
|
5761
|
+
title: "Set Purchase Details",
|
|
5762
|
+
description: "Click here to set the details of your crypto purchase."
|
|
5763
|
+
},
|
|
5764
|
+
binanceEstimate: {
|
|
5765
|
+
title: "Confirm your purchase",
|
|
5766
|
+
description: "Review the details of your purchase before confirming."
|
|
5767
|
+
}
|
|
5704
5768
|
}
|
|
5705
5769
|
},
|
|
5706
5770
|
portfolioMenu: {
|
|
@@ -5889,6 +5953,12 @@ var init_ru = __esm({
|
|
|
5889
5953
|
selectNone: "\u0421\u043D\u044F\u0442\u044C \u0432\u044B\u0431\u043E\u0440",
|
|
5890
5954
|
errors: {
|
|
5891
5955
|
oops: "\u0423\u043F\u0441, \u0447\u0442\u043E-\u0442\u043E \u043F\u043E\u0448\u043B\u043E \u043D\u0435 \u0442\u0430\u043A. \u041F\u043E\u0436\u0430\u043B\u0443\u0439\u0441\u0442\u0430, \u043F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0441\u043D\u043E\u0432\u0430."
|
|
5956
|
+
},
|
|
5957
|
+
onboarding: {
|
|
5958
|
+
tourButton: {
|
|
5959
|
+
title: "\u041A\u043D\u043E\u043F\u043A\u0430 \u0442\u0443\u0440\u0430",
|
|
5960
|
+
description: "\u0422\u0443\u0440\u044B \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u044B \u043F\u043E\u0434 \u043A\u043D\u043E\u043F\u043A\u0430\u043C\u0438 \xAB?\xBB \u043C\u0435\u043D\u044E embarkAI. \u041D\u0430\u0436\u043C\u0438\u0442\u0435, \u0447\u0442\u043E\u0431\u044B \u043F\u0440\u043E\u0439\u0442\u0438 \u0442\u0443\u0440 \u043F\u043E \u043C\u0435\u043D\u044E"
|
|
5961
|
+
}
|
|
5892
5962
|
}
|
|
5893
5963
|
},
|
|
5894
5964
|
auth: {
|
|
@@ -5941,14 +6011,23 @@ var init_ru = __esm({
|
|
|
5941
6011
|
actions: {
|
|
5942
6012
|
send: "\u041E\u0422\u041F\u0420\u0410\u0412\u0418\u0422\u042C",
|
|
5943
6013
|
confirm: "\u041F\u041E\u0414\u0422\u0412\u0415\u0420\u0414\u0418\u0422\u042C \u041E\u0422\u041F\u0420\u0410\u0412\u041A\u0423"
|
|
6014
|
+
},
|
|
6015
|
+
onboarding: {
|
|
6016
|
+
sendMenu: {
|
|
6017
|
+
title: "\u041C\u0435\u043D\u044E \u043E\u0442\u043F\u0440\u0430\u0432\u043A\u0438",
|
|
6018
|
+
description: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u043A\u0440\u0438\u043F\u0442\u043E\u0430\u043A\u0442\u0438\u0432 \u0434\u043B\u044F \u043E\u0442\u043F\u0440\u0430\u0432\u043A\u0438 \u0438 \u0432\u0432\u0435\u0434\u0438\u0442\u0435 \u0430\u0434\u0440\u0435\u0441 \u043F\u043E\u043B\u0443\u0447\u0430\u0442\u0435\u043B\u044F \u0438 \u0441\u0443\u043C\u043C\u0443."
|
|
6019
|
+
},
|
|
6020
|
+
sendCryptoSummary: {
|
|
6021
|
+
title: "\u0421\u0432\u043E\u0434\u043A\u0430 \u043E\u0442\u043F\u0440\u0430\u0432\u043A\u0438",
|
|
6022
|
+
description: "\u041F\u0440\u043E\u0432\u0435\u0440\u044C\u0442\u0435 \u0434\u0435\u0442\u0430\u043B\u0438 \u043F\u0435\u0440\u0435\u0432\u043E\u0434\u0430 \u043F\u0435\u0440\u0435\u0434 \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u0438\u0435\u043C, \u0437\u0430\u0442\u0435\u043C \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435 \u0442\u0440\u0430\u043D\u0437\u0430\u043A\u0446\u0438\u044E."
|
|
6023
|
+
}
|
|
5944
6024
|
}
|
|
5945
6025
|
},
|
|
5946
6026
|
bridgeMenu: {
|
|
5947
6027
|
title: "\u041F\u0435\u0440\u0435\u043C\u0435\u0441\u0442\u0438\u0442\u044C \u0410\u043A\u0442\u0438\u0432",
|
|
5948
6028
|
labels: {
|
|
5949
|
-
sender: "\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u0435\u043B\u044C",
|
|
5950
6029
|
bridgeAsset: "\u041F\u0435\u0440\u0435\u043C\u0435\u0441\u0442\u0438\u0442\u044C {{asset}}",
|
|
5951
|
-
|
|
6030
|
+
selectSender: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u043A\u043E\u0448\u0435\u043B\u0451\u043A-\u043E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u0435\u043B\u044C",
|
|
5952
6031
|
selectToken: "\u0412\u044B\u0431\u0440\u0430\u0442\u044C \u043C\u0430\u0440\u0448\u0440\u0443\u0442 \u0442\u043E\u043A\u0435\u043D\u0430",
|
|
5953
6032
|
estimations: "\u041E\u0446\u0435\u043D\u043A\u0438",
|
|
5954
6033
|
estimatedFee: "\u041E\u0436\u0438\u0434\u0430\u0435\u043C\u0430\u044F \u043A\u043E\u043C\u0438\u0441\u0441\u0438\u044F",
|
|
@@ -5973,11 +6052,12 @@ var init_ru = __esm({
|
|
|
5973
6052
|
},
|
|
5974
6053
|
actions: {
|
|
5975
6054
|
connectWallet: "\u041F\u041E\u0414\u041A\u041B\u042E\u0427\u0418\u0422\u042C \u041A\u041E\u0428\u0415\u041B\u0401\u041A",
|
|
6055
|
+
addExternalWalletProfile: "\u0414\u041E\u0411\u0410\u0412\u0418\u0422\u042C \u041F\u0420\u041E\u0424\u0418\u041B\u042C \u041A\u041E\u0428\u0415\u041B\u042C\u041A\u0410",
|
|
5976
6056
|
bridge: "\u041F\u0415\u0420\u0415\u041C\u0415\u0421\u0422\u0418\u0422\u042C",
|
|
5977
6057
|
estimateQuote: "\u0420\u0410\u0421\u0421\u0427\u0418\u0422\u0410\u0422\u042C \u0421\u0422\u041E\u0418\u041C\u041E\u0421\u0422\u042C",
|
|
5978
6058
|
bridgeAsset: "\u041F\u0415\u0420\u0415\u041C\u0415\u0421\u0422\u0418\u0422\u042C {{asset}}",
|
|
5979
6059
|
selectAsset: "\u0412\u042B\u0411\u0420\u0410\u0422\u042C \u0410\u041A\u0422\u0418\u0412",
|
|
5980
|
-
confirmBridge: "\
|
|
6060
|
+
confirmBridge: "\u042F \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0430\u044E \u043F\u0435\u0440\u0435\u043C\u0435\u0449\u0435\u043D\u0438\u0435 {{amount}} {{asset}} \u0432 {{destinationChain}}"
|
|
5981
6061
|
},
|
|
5982
6062
|
statuses: {
|
|
5983
6063
|
balanceInsufficient: "\u041D\u0435\u0434\u043E\u0441\u0442\u0430\u0442\u043E\u0447\u043D\u043E \u0441\u0440\u0435\u0434\u0441\u0442\u0432",
|
|
@@ -5997,7 +6077,37 @@ var init_ru = __esm({
|
|
|
5997
6077
|
noConnections: "\u0421\u043E\u0435\u0434\u0438\u043D\u0435\u043D\u0438\u0439 \u043C\u0435\u0436\u0434\u0443 {{originChain}} \u0438 {{destinationChain}} \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u043E",
|
|
5998
6078
|
wrongNetwork: " \u041F\u043E\u0436\u0430\u043B\u0443\u0439\u0441\u0442\u0430, \u043F\u0435\u0440\u0435\u043A\u043B\u044E\u0447\u0438\u0442\u0435 EmbarkAI \u043D\u0430 \u0438\u0441\u0445\u043E\u0434\u043D\u0443\u044E \u0441\u0435\u0442\u044C \u0434\u043B\u044F \u043F\u0440\u043E\u0434\u043E\u043B\u0436\u0435\u043D\u0438\u044F \u043F\u0435\u0440\u0435\u043C\u0435\u0449\u0435\u043D\u0438\u044F",
|
|
5999
6079
|
noHistory: "\u0418\u0441\u0442\u043E\u0440\u0438\u044F \u043F\u0435\u0440\u0435\u043C\u0435\u0449\u0435\u043D\u0438\u0439 \u043F\u0443\u0441\u0442\u0430. \u041F\u0435\u0440\u0435\u043C\u0435\u0441\u0442\u0438\u0442\u0435 \u0432\u0430\u0448\u0438 \u0430\u043A\u0442\u0438\u0432\u044B, \u0447\u0442\u043E\u0431\u044B \u0443\u0432\u0438\u0434\u0435\u0442\u044C \u0438\u0441\u0442\u043E\u0440\u0438\u044E \u0437\u0434\u0435\u0441\u044C.",
|
|
6000
|
-
unsupportedNetwork: "\u041F\u0435\u0440\u0435\u043C\u0435\u0449\u0435\u043D\u0438\u0435 \u0438\u0437
|
|
6080
|
+
unsupportedNetwork: "\u041F\u0435\u0440\u0435\u043C\u0435\u0449\u0435\u043D\u0438\u0435 \u0438\u0437 {{originChain}} \u043D\u0435 \u0432\u043E\u0437\u043C\u043E\u0436\u043D\u043E \u0434\u043B\u044F {{sender}}. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0438\u0437\u043C\u0435\u043D\u0438\u0442\u044C \u043F\u0430\u0440\u0443 \u0441\u0435\u0442\u0435\u0439, \u0432\u044B\u0431\u0440\u0430\u0442\u044C \u0434\u0440\u0443\u0433\u043E\u0439 \u043C\u0430\u0440\u0448\u0440\u0443\u0442 \u0442\u043E\u043A\u0435\u043D\u0430, \u0441\u043C\u0435\u043D\u0438\u0442\u044C \u043A\u043E\u0448\u0435\u043B\u0451\u043A \u043E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u0435\u043B\u044F \u0438\u043B\u0438, \u0435\u0441\u043B\u0438 \u043E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u0435\u043B\u044C \u2014 EmbarkAI, \u0443\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044C, \u0447\u0442\u043E \u043E\u043D \u043F\u0435\u0440\u0435\u043A\u043B\u044E\u0447\u0435\u043D \u043D\u0430 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044E\u0449\u0443\u044E \u0441\u0435\u0442\u044C \xAB\u0418\u0437 \u0441\u0435\u0442\u0438\xBB."
|
|
6081
|
+
},
|
|
6082
|
+
onboarding: {
|
|
6083
|
+
bridgeMenu: {
|
|
6084
|
+
title: "\u041C\u0435\u043D\u044E \u043F\u0435\u0440\u0435\u043C\u0435\u0449\u0435\u043D\u0438\u044F",
|
|
6085
|
+
description: "\u041E\u0442\u043F\u0440\u0430\u0432\u043A\u0430 \u0447\u0435\u0440\u0435\u0437 \u043F\u0435\u0440\u0435\u043C\u0435\u0449\u0435\u043D\u0438\u0435 \u043E\u0431\u0435\u0441\u043F\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u0441\u043F\u043E\u0441\u043E\u0431 \u043E\u0442\u043F\u0440\u0430\u0432\u043A\u0438 \u043A\u0440\u0438\u043F\u0442\u043E\u0430\u043A\u0442\u0438\u0432\u043E\u0432 \u0447\u0435\u0440\u0435\u0437 \u0440\u0430\u0437\u043D\u044B\u0435 \u0431\u043B\u043E\u043A\u0447\u0435\u0439\u043D-\u0441\u0435\u0442\u0438."
|
|
6086
|
+
},
|
|
6087
|
+
bridgeSenderWalletSelector: {
|
|
6088
|
+
title: "\u0412\u044B\u0431\u043E\u0440 \u043A\u043E\u0448\u0435\u043B\u044C\u043A\u0430-\u043E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u0435\u043B\u044F",
|
|
6089
|
+
description: "EmbarkAI \u043C\u043E\u0436\u0435\u0442 \u0431\u044B\u0442\u044C \u0430\u0443\u0442\u0435\u043D\u0442\u0438\u0444\u0438\u0446\u0438\u0440\u043E\u0432\u0430\u043D \u0432\u043D\u0435\u0448\u043D\u0438\u043C \u043A\u043E\u0448\u0435\u043B\u044C\u043A\u043E\u043C \u043A\u0430\u043A \u043F\u043E\u0441\u0442\u0430\u0432\u0449\u0438\u043A \u043F\u0440\u043E\u0444\u0438\u043B\u044F \u0430\u0443\u0442\u0435\u043D\u0442\u0438\u0444\u0438\u043A\u0430\u0446\u0438\u0438 (\u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438 -> \u041F\u0440\u043E\u0444\u0438\u043B\u0438).\n \u041F\u0440\u043E\u0444\u0438\u043B\u044C \u0432\u043D\u0435\u0448\u043D\u0435\u0433\u043E \u043A\u043E\u0448\u0435\u043B\u044C\u043A\u0430 \u043C\u043E\u0436\u0435\u0442 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C\u0441\u044F \u043A\u0430\u043A \u043E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u0435\u043B\u044C (\u043F\u043E\u0434\u043F\u0438\u0441\u0430\u043D\u0442 \u0442\u0440\u0430\u043D\u0437\u0430\u043A\u0446\u0438\u0439) \u0434\u043B\u044F \u043F\u0435\u0440\u0435\u043C\u0435\u0449\u0435\u043D\u0438\u044F \u043A\u0440\u0438\u043F\u0442\u043E\u0432\u0430\u043B\u044E\u0442\u044B \u0432 embarkAI.\n \u0414\u043E\u0431\u0430\u0432\u044C\u0442\u0435 \u043F\u0440\u043E\u0444\u0438\u043B\u044C \u0432\u043D\u0435\u0448\u043D\u0435\u0433\u043E \u043A\u043E\u0448\u0435\u043B\u044C\u043A\u0430, \u0435\u0441\u043B\u0438 \u044D\u0442\u043E \u0435\u0449\u0451 \u043D\u0435 \u0441\u0434\u0435\u043B\u0430\u043D\u043E (\u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438 -> \u041F\u0440\u043E\u0444\u0438\u043B\u0438), \u0438 \u0441\u043B\u0435\u0434\u0443\u0439\u0442\u0435 \u0438\u043D\u0441\u0442\u0440\u0443\u043A\u0446\u0438\u044F\u043C."
|
|
6090
|
+
},
|
|
6091
|
+
bridgeCryptoAssetSelector: {
|
|
6092
|
+
title: "\u0412\u044B\u0431\u043E\u0440 \u0430\u043A\u0442\u0438\u0432\u0430 \u0434\u043B\u044F \u043F\u0435\u0440\u0435\u043C\u0435\u0449\u0435\u043D\u0438\u044F",
|
|
6093
|
+
description: "\u041F\u0435\u0440\u0435\u043C\u0435\u0449\u0435\u043D\u0438\u0435 \u043F\u0440\u043E\u0438\u0441\u0445\u043E\u0434\u0438\u0442 \u0438\u0437 \u043E\u0434\u043D\u043E\u0439 \u0431\u043B\u043E\u043A\u0447\u0435\u0439\u043D-\u0441\u0435\u0442\u0438 \u0432 \u0434\u0440\u0443\u0433\u0443\u044E.\n \u0421 \u043F\u043E\u043C\u043E\u0449\u044C\u044E \u044D\u0442\u043E\u0433\u043E \u0441\u0435\u043B\u0435\u043A\u0442\u043E\u0440\u0430 \u0432\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0430\u043A\u0442\u0438\u0432, \u043A\u043E\u0442\u043E\u0440\u044B\u0439 \u0445\u043E\u0442\u0438\u0442\u0435 \u043F\u0435\u0440\u0435\u043C\u0435\u0441\u0442\u0438\u0442\u044C, \u0437\u0430\u0442\u0435\u043C \u0432\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u0443\u044E \u0434\u043B\u044F \u043D\u0435\u0433\u043E \u043F\u0430\u0440\u0443 \u0441\u0435\u0442\u0435\u0439."
|
|
6094
|
+
},
|
|
6095
|
+
bridgeChainPairSwapper: {
|
|
6096
|
+
title: "\u0423\u0441\u0442\u0430\u043D\u043E\u0432\u043A\u0430 \u0438\u0441\u0445\u043E\u0434\u043D\u043E\u0439 \u0438 \u0446\u0435\u043B\u0435\u0432\u043E\u0439 \u0441\u0435\u0442\u0438",
|
|
6097
|
+
description: "\u041C\u0430\u0440\u0448\u0440\u0443\u0442 \u043F\u0435\u0440\u0435\u043C\u0435\u0449\u0435\u043D\u0438\u044F (\u043F\u0430\u0440\u0430 \u0441\u0435\u0442\u0435\u0439) \u044F\u0432\u043B\u044F\u0435\u0442\u0441\u044F \u0434\u0432\u0443\u043D\u0430\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u043D\u044B\u043C, \u0442\u043E \u0435\u0441\u0442\u044C \u0438\u0441\u0445\u043E\u0434\u043D\u0443\u044E \u0438 \u0446\u0435\u043B\u0435\u0432\u0443\u044E \u0441\u0435\u0442\u0438 \u043C\u043E\u0436\u043D\u043E \u043F\u043E\u043C\u0435\u043D\u044F\u0442\u044C \u043C\u0435\u0441\u0442\u0430\u043C\u0438.\n \u0418\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0439\u0442\u0435 \u043A\u043D\u043E\u043F\u043A\u0443 \xAB\u21C4\xBB \u0434\u043B\u044F \u0443\u0441\u0442\u0430\u043D\u043E\u0432\u043A\u0438 \u0438\u0441\u0445\u043E\u0434\u043D\u043E\u0439 \u0438 \u0446\u0435\u043B\u0435\u0432\u043E\u0439 \u0441\u0435\u0442\u0435\u0439."
|
|
6098
|
+
},
|
|
6099
|
+
bridgeAmountRecipientInputs: {
|
|
6100
|
+
title: "\u0423\u0441\u0442\u0430\u043D\u043E\u0432\u043A\u0430 \u0441\u0443\u043C\u043C\u044B \u0438 \u043F\u043E\u043B\u0443\u0447\u0430\u0442\u0435\u043B\u044F",
|
|
6101
|
+
description: "\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0441\u0443\u043C\u043C\u0443 \u0434\u043B\u044F \u043F\u0435\u0440\u0435\u043C\u0435\u0449\u0435\u043D\u0438\u044F \u0438 \u043F\u0440\u0438 \u043D\u0435\u043E\u0431\u0445\u043E\u0434\u0438\u043C\u043E\u0441\u0442\u0438 \u0443\u043A\u0430\u0436\u0438\u0442\u0435 \u0430\u0434\u0440\u0435\u0441 \u043F\u043E\u043B\u0443\u0447\u0430\u0442\u0435\u043B\u044F. \u0415\u0441\u043B\u0438 \u043F\u043E\u043B\u0443\u0447\u0430\u0442\u0435\u043B\u044C \u043D\u0435 \u0443\u043A\u0430\u0437\u0430\u043D: \u0430\u0434\u0440\u0435\u0441 \u0432 \u0446\u0435\u043B\u0435\u0432\u043E\u0439 \u0441\u0435\u0442\u0438 \u0441\u043E\u0432\u043F\u0430\u0434\u0430\u0435\u0442 \u0441 \u0430\u0434\u0440\u0435\u0441\u043E\u043C \u043E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u0435\u043B\u044F \u0432 \u0438\u0441\u0445\u043E\u0434\u043D\u043E\u0439 \u0441\u0435\u0442\u0438."
|
|
6102
|
+
},
|
|
6103
|
+
bridgeEstimateQuoteButton: {
|
|
6104
|
+
title: "\u041E\u0446\u0435\u043D\u043A\u0430 \u0441\u0442\u043E\u0438\u043C\u043E\u0441\u0442\u0438 \u043F\u0435\u0440\u0435\u043C\u0435\u0449\u0435\u043D\u0438\u044F",
|
|
6105
|
+
description: "\u041F\u043E\u043B\u0443\u0447\u0438\u0442\u0435 \u043F\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043B\u044C\u043D\u0443\u044E \u043E\u0446\u0435\u043D\u043A\u0443 \u0442\u0440\u0430\u043D\u0437\u0430\u043A\u0446\u0438\u0438 \u043F\u0435\u0440\u0435\u043C\u0435\u0449\u0435\u043D\u0438\u044F \u0434\u043E \u0444\u0430\u043A\u0442\u0438\u0447\u0435\u0441\u043A\u043E\u0433\u043E \u0432\u044B\u043F\u043E\u043B\u043D\u0435\u043D\u0438\u044F. \u042D\u0442\u043E \u043F\u043E\u043C\u043E\u0436\u0435\u0442 \u043F\u0440\u0438\u043D\u044F\u0442\u044C \u043E\u0431\u043E\u0441\u043D\u043E\u0432\u0430\u043D\u043D\u043E\u0435 \u0440\u0435\u0448\u0435\u043D\u0438\u0435 \u043F\u0435\u0440\u0435\u0434 \u043F\u0440\u043E\u0434\u043E\u043B\u0436\u0435\u043D\u0438\u0435\u043C."
|
|
6106
|
+
},
|
|
6107
|
+
bridgeEstimatedQuoteMenu: {
|
|
6108
|
+
title: "\u0420\u0430\u0441\u0447\u0451\u0442\u043D\u0430\u044F \u0441\u0442\u043E\u0438\u043C\u043E\u0441\u0442\u044C \u043F\u0435\u0440\u0435\u043C\u0435\u0449\u0435\u043D\u0438\u044F",
|
|
6109
|
+
description: "\u041E\u0431\u044F\u0437\u0430\u0442\u0435\u043B\u044C\u043D\u043E \u043F\u0440\u043E\u0432\u0435\u0440\u044C\u0442\u0435 \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438 \u043F\u0435\u0440\u0435\u043C\u0435\u0449\u0435\u043D\u0438\u044F \u0438 \u0440\u0430\u0441\u0447\u0451\u0442\u043D\u0443\u044E \u0441\u0442\u043E\u0438\u043C\u043E\u0441\u0442\u044C, \u0437\u0430\u0442\u0435\u043C \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435 \u0442\u0440\u0430\u043D\u0437\u0430\u043A\u0446\u0438\u044E."
|
|
6110
|
+
}
|
|
6001
6111
|
}
|
|
6002
6112
|
},
|
|
6003
6113
|
receiveMenu: {
|
|
@@ -6007,7 +6117,7 @@ var init_ru = __esm({
|
|
|
6007
6117
|
share: "\u041F\u043E\u0434\u0435\u043B\u0438\u0442\u0435\u0441\u044C \u044D\u0442\u0438\u043C \u0430\u0434\u0440\u0435\u0441\u043E\u043C, \u0447\u0442\u043E\u0431\u044B \u043F\u043E\u043B\u0443\u0447\u0438\u0442\u044C \u0442\u043E\u043A\u0435\u043D\u044B"
|
|
6008
6118
|
},
|
|
6009
6119
|
buyMenu: {
|
|
6010
|
-
title: "\u041A\u0443\u043F\u0438\u0442\u044C \u043A\u0440\u0438\u043F\u0442\u043E
|
|
6120
|
+
title: "\u041A\u0443\u043F\u0438\u0442\u044C \u043A\u0440\u0438\u043F\u0442\u043E",
|
|
6011
6121
|
provider: "Onramp-\u0441\u0435\u0440\u0432\u0438\u0441",
|
|
6012
6122
|
selectProvider: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 Onramp-\u0441\u0435\u0440\u0432\u0438\u0441",
|
|
6013
6123
|
selectCrypto: "\u041A\u0440\u0438\u043F\u0442\u043E\u0432\u0430\u043B\u044E\u0442\u0430",
|
|
@@ -6027,7 +6137,12 @@ var init_ru = __esm({
|
|
|
6027
6137
|
exchangeRate: "\u041A\u0443\u0440\u0441 \u043E\u0431\u043C\u0435\u043D\u0430",
|
|
6028
6138
|
networkFee: "\u0421\u0435\u0442\u0435\u0432\u043E\u0439 \u0441\u0431\u043E\u0440",
|
|
6029
6139
|
serviceFee: "\u0421\u0435\u0440\u0432\u0438\u0441\u043D\u044B\u0439 \u0441\u0431\u043E\u0440",
|
|
6030
|
-
paymentMethod: "\u0421\u043F\u043E\u0441\u043E\u0431 \u043E\u043F\u043B\u0430\u0442\u044B"
|
|
6140
|
+
paymentMethod: "\u0421\u043F\u043E\u0441\u043E\u0431 \u043E\u043F\u043B\u0430\u0442\u044B",
|
|
6141
|
+
toAddress: {
|
|
6142
|
+
receiver: "\u0412\u041D\u0418\u041C\u0410\u041D\u0418\u0415! \u0410\u0434\u0440\u0435\u0441 \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u0438\u044F",
|
|
6143
|
+
message: "\u0412\u044B \u0441\u043E\u0431\u0438\u0440\u0430\u0435\u0442\u0435\u0441\u044C \u043A\u0443\u043F\u0438\u0442\u044C \u043A\u0440\u0438\u043F\u0442\u043E\u0432\u0430\u043B\u044E\u0442\u0443 \u043D\u0430 \u0432\u043D\u0435\u0448\u043D\u0438\u0439 \u0430\u0434\u0440\u0435\u0441, \u0430 \u043D\u0435 \u043D\u0430 \u0432\u0430\u0448 \u0430\u0434\u0440\u0435\u0441 embarkAI.",
|
|
6144
|
+
suggestion: "\u041F\u043E\u0436\u0430\u043B\u0443\u0439\u0441\u0442\u0430, \u0443\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044C, \u0447\u0442\u043E \u044D\u0442\u043E \u0432\u0430\u0448 \u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u044B\u0439 \u0430\u0434\u0440\u0435\u0441 \u043A\u043E\u0448\u0435\u043B\u044C\u043A\u0430, \u0438\u043D\u0430\u0447\u0435 \u0432\u044B \u043C\u043E\u0436\u0435\u0442\u0435 \u043F\u043E\u0442\u0435\u0440\u044F\u0442\u044C \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430."
|
|
6145
|
+
}
|
|
6031
6146
|
},
|
|
6032
6147
|
transactionHistory: {
|
|
6033
6148
|
details: "\u0414\u0435\u0442\u0430\u043B\u0438"
|
|
@@ -6041,11 +6156,30 @@ var init_ru = __esm({
|
|
|
6041
6156
|
inputPlaceholder: {
|
|
6042
6157
|
selectCurrencies: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u043A\u0440\u0438\u043F\u0442\u043E\u0432\u0430\u043B\u044E\u0442\u0443 \u0438 \u0444\u0438\u0430\u0442",
|
|
6043
6158
|
providerMin: "{{provider}}: \u0422\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044F \u043C\u0438\u043D\u0438\u043C\u0443\u043C {{minimum}} {{currency}}"
|
|
6159
|
+
},
|
|
6160
|
+
onboarding: {
|
|
6161
|
+
buyMenu: {
|
|
6162
|
+
title: "\u041C\u0435\u043D\u044E \u043F\u043E\u043A\u0443\u043F\u043A\u0438",
|
|
6163
|
+
description: "\u0417\u0434\u0435\u0441\u044C \u0432\u044B \u043C\u043E\u0436\u0435\u0442\u0435 \u0441\u043E\u0432\u0435\u0440\u0448\u0430\u0442\u044C \u043F\u043E\u043A\u0443\u043F\u043A\u0438 \u043A\u0440\u0438\u043F\u0442\u043E\u0432\u0430\u043B\u044E\u0442\u044B."
|
|
6164
|
+
},
|
|
6165
|
+
providerSelector: {
|
|
6166
|
+
title: "\u0412\u044B\u0431\u043E\u0440 \u043F\u0440\u043E\u0432\u0430\u0439\u0434\u0435\u0440\u0430",
|
|
6167
|
+
description: "\u041D\u0430\u0436\u043C\u0438\u0442\u0435 \u0437\u0434\u0435\u0441\u044C, \u0447\u0442\u043E\u0431\u044B \u0432\u044B\u0431\u0440\u0430\u0442\u044C \u043F\u0440\u043E\u0432\u0430\u0439\u0434\u0435\u0440\u0430 \u0434\u043B\u044F \u043F\u043E\u043A\u0443\u043F\u043A\u0438 \u043A\u0440\u0438\u043F\u0442\u043E\u0432\u0430\u043B\u044E\u0442\u044B."
|
|
6168
|
+
},
|
|
6169
|
+
binanceMenu: {
|
|
6170
|
+
title: "\u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0430 \u0434\u0435\u0442\u0430\u043B\u0435\u0439 \u043F\u043E\u043A\u0443\u043F\u043A\u0438",
|
|
6171
|
+
description: "\u041D\u0430\u0436\u043C\u0438\u0442\u0435 \u0437\u0434\u0435\u0441\u044C, \u0447\u0442\u043E\u0431\u044B \u0437\u0430\u0434\u0430\u0442\u044C \u0434\u0435\u0442\u0430\u043B\u0438 \u043F\u043E\u043A\u0443\u043F\u043A\u0438 \u043A\u0440\u0438\u043F\u0442\u043E\u0432\u0430\u043B\u044E\u0442\u044B."
|
|
6172
|
+
},
|
|
6173
|
+
binanceEstimate: {
|
|
6174
|
+
title: "\u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u0438\u0435 \u043F\u043E\u043A\u0443\u043F\u043A\u0438",
|
|
6175
|
+
description: "\u041F\u0440\u043E\u0432\u0435\u0440\u044C\u0442\u0435 \u0434\u0435\u0442\u0430\u043B\u0438 \u043F\u043E\u043A\u0443\u043F\u043A\u0438 \u043F\u0435\u0440\u0435\u0434 \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u0438\u0435\u043C."
|
|
6176
|
+
}
|
|
6044
6177
|
}
|
|
6045
6178
|
},
|
|
6046
6179
|
portfolioMenu: {
|
|
6047
6180
|
title: "\u0412\u0430\u0448\u0438 \u0430\u043A\u0442\u0438\u0432\u044B",
|
|
6048
|
-
noAssets: "\u0410\u043A\u0442\u0438\u0432\u044B \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u044B"
|
|
6181
|
+
noAssets: "\u0410\u043A\u0442\u0438\u0432\u044B \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u044B",
|
|
6182
|
+
noBlockscout: "Blockscout API \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D \u0434\u043B\u044F \u0441\u0435\u0442\u0438: {{chain}}"
|
|
6049
6183
|
},
|
|
6050
6184
|
transactionsMenu: {
|
|
6051
6185
|
title: "\u0418\u0441\u0442\u043E\u0440\u0438\u044F \u0442\u0440\u0430\u043D\u0437\u0430\u043A\u0446\u0438\u0439",
|
|
@@ -6228,6 +6362,12 @@ var init_zh = __esm({
|
|
|
6228
6362
|
selectNone: "\u5168\u4E0D\u9009",
|
|
6229
6363
|
errors: {
|
|
6230
6364
|
oops: "\u54CE\u5440\uFF0C\u51FA\u4E86\u70B9\u95EE\u9898\u3002\u8BF7\u518D\u8BD5\u4E00\u6B21\u3002"
|
|
6365
|
+
},
|
|
6366
|
+
onboarding: {
|
|
6367
|
+
tourButton: {
|
|
6368
|
+
title: "\u5BFC\u89C8\u6309\u9215",
|
|
6369
|
+
description: "\u5BFC\u89C8\u529F\u80FD\u53EF\u5728 embarkAI \u83DC\u5355\u7684\u201C\uFF1F\u201D\u6309\u9215\u4E0B\u627E\u5230\u3002\u70B9\u51FB\u5373\u53EF\u5F00\u59CB\u83DC\u5355\u5BFC\u89C8"
|
|
6370
|
+
}
|
|
6231
6371
|
}
|
|
6232
6372
|
},
|
|
6233
6373
|
auth: {
|
|
@@ -6280,14 +6420,23 @@ var init_zh = __esm({
|
|
|
6280
6420
|
actions: {
|
|
6281
6421
|
send: "\u53D1\u9001",
|
|
6282
6422
|
confirm: "\u786E\u8BA4\u53D1\u9001"
|
|
6423
|
+
},
|
|
6424
|
+
onboarding: {
|
|
6425
|
+
sendMenu: {
|
|
6426
|
+
title: "\u53D1\u9001\u83DC\u5355",
|
|
6427
|
+
description: "\u9009\u62E9\u8981\u53D1\u9001\u7684\u52A0\u5BC6\u8D44\u4EA7\uFF0C\u7136\u540E\u8F93\u5165\u6536\u6B3E\u5730\u5740\u548C\u91D1\u989D\u3002"
|
|
6428
|
+
},
|
|
6429
|
+
sendCryptoSummary: {
|
|
6430
|
+
title: "\u53D1\u9001\u6458\u8981",
|
|
6431
|
+
description: "\u5728\u786E\u8BA4\u524D\u67E5\u770B\u52A0\u5BC6\u8F6C\u8D26\u8BE6\u60C5\uFF0C\u7136\u540E\u786E\u8BA4\u4EA4\u6613\u3002"
|
|
6432
|
+
}
|
|
6283
6433
|
}
|
|
6284
6434
|
},
|
|
6285
6435
|
bridgeMenu: {
|
|
6286
6436
|
title: "\u8DE8\u94FE\u8D44\u4EA7",
|
|
6287
6437
|
labels: {
|
|
6288
|
-
sender: "\u53D1\u9001\u65B9",
|
|
6289
6438
|
bridgeAsset: "\u8DE8\u94FE {{asset}}",
|
|
6290
|
-
|
|
6439
|
+
selectSender: "\u9009\u62E9\u53D1\u9001\u65B9\u94B1\u5305",
|
|
6291
6440
|
selectToken: "\u9009\u62E9\u4EE3\u5E01\u8DEF\u7531",
|
|
6292
6441
|
estimations: "\u9884\u4F30",
|
|
6293
6442
|
estimatedFee: "\u9884\u4F30\u624B\u7EED\u8D39",
|
|
@@ -6312,11 +6461,12 @@ var init_zh = __esm({
|
|
|
6312
6461
|
},
|
|
6313
6462
|
actions: {
|
|
6314
6463
|
connectWallet: "\u8FDE\u63A5\u9489\u5305",
|
|
6464
|
+
addExternalWalletProfile: "\u6DFB\u52A0\u5916\u90E8\u94B1\u5305\u914D\u7F6E\u6587\u4EF6",
|
|
6315
6465
|
bridge: "\u8DE8\u94FE",
|
|
6316
6466
|
estimateQuote: "\u4F30\u7B97\u62A5\u4EF7",
|
|
6317
6467
|
bridgeAsset: "\u8DE8\u94FE {{asset}}",
|
|
6318
6468
|
selectAsset: "\u9009\u62E9\u8D44\u4EA7",
|
|
6319
|
-
confirmBridge: "\u786E\u8BA4\u8DE8\u94FE"
|
|
6469
|
+
confirmBridge: "\u6211\u786E\u8BA4\u5C06 {{amount}} {{asset}} \u8DE8\u94FE\u5230 {{destinationChain}}"
|
|
6320
6470
|
},
|
|
6321
6471
|
statuses: {
|
|
6322
6472
|
balanceInsufficient: "\u4F59\u989D\u4E0D\u8DB3",
|
|
@@ -6337,6 +6487,36 @@ var init_zh = __esm({
|
|
|
6337
6487
|
wrongNetwork: " \u8BF7\u5C06 EmbarkAI \u5207\u6362\u81F3\u6E90\u94FE\u4EE5\u7EE7\u7EED\u8DE8\u94FE\u64CD\u4F5C",
|
|
6338
6488
|
noHistory: "\u6682\u65E0\u8DE8\u94FE\u8BB0\u5F55\u3002\u8DE8\u94FE\u60A8\u7684\u8D44\u4EA7\u540E\uFF0C\u5386\u53F2\u8BB0\u5F55\u5C06\u663E\u793A\u5728\u6B64\u5904\u3002",
|
|
6339
6489
|
unsupportedNetwork: "{{sender}} \u5C1A\u4E0D\u652F\u6301\u4ECE {{originChain}} \u8DE8\u94FE\u3002\u8BF7\u5207\u6362\u7F51\u7EDC\u5BF9\u3001\u9009\u62E9\u4E0D\u540C\u7684\u4EE3\u5E01\u8DEF\u7531\u6216\u66F4\u6362\u53D1\u9001\u9489\u5305"
|
|
6490
|
+
},
|
|
6491
|
+
onboarding: {
|
|
6492
|
+
bridgeMenu: {
|
|
6493
|
+
title: "\u8DE8\u94FE\u83DC\u5355",
|
|
6494
|
+
description: "\u901A\u8FC7\u8DE8\u94FE\u53D1\u9001\u53EF\u4EE5\u5728\u4E0D\u540C\u533A\u5757\u94FE\u7F51\u7EDC\u4E4B\u95F4\u8F6C\u79FB\u52A0\u5BC6\u8D44\u4EA7\u3002"
|
|
6495
|
+
},
|
|
6496
|
+
bridgeSenderWalletSelector: {
|
|
6497
|
+
title: "\u9009\u62E9\u53D1\u9001\u65B9\u9489\u5305",
|
|
6498
|
+
description: "EmbarkAI \u53EF\u4EE5\u901A\u8FC7\u5916\u90E8\u9489\u5305\u8FDB\u884C\u8EAB\u4EFD\u9A8C\u8BC1\uFF0C\u4F5C\u4E3A\u8EAB\u4EFD\u9A8C\u8BC1\u914D\u7F6E\u6587\u4EF6\u63D0\u4F9B\u5546\uFF08\u8BBE\u7F6E -> \u914D\u7F6E\u6587\u4EF6\uFF09\u3002\n \u5916\u90E8\u9489\u5305\u914D\u7F6E\u6587\u4EF6\u53EF\u7528\u4F5C\u8DE8\u94FE\u52A0\u5BC6\u8D44\u4EA7\u5230 embarkAI \u7684\u53D1\u9001\u65B9\uFF08\u4EA4\u6613\u7B7E\u540D\u8005\uFF09\u3002\n \u5982\u5C1A\u672A\u6DFB\u52A0\u5916\u90E8\u9489\u5305\u914D\u7F6E\u6587\u4EF6\uFF0C\u8BF7\u524D\u5F80\uFF08\u8BBE\u7F6E -> \u914D\u7F6E\u6587\u4EF6\uFF09\u6DFB\u52A0\u5E76\u6309\u7167\u63D0\u793A\u64CD\u4F5C\u3002"
|
|
6499
|
+
},
|
|
6500
|
+
bridgeCryptoAssetSelector: {
|
|
6501
|
+
title: "\u9009\u62E9\u8DE8\u94FE\u8D44\u4EA7",
|
|
6502
|
+
description: "\u8DE8\u94FE\u64CD\u4F5C\u53D1\u751F\u5728\u4E00\u4E2A\u533A\u5757\u94FE\u7F51\u7EDC\u5230\u53E6\u4E00\u4E2A\u4E4B\u95F4\u3002\n \u4F7F\u7528\u6B64\u9009\u62E9\u5668\u9009\u62E9\u8981\u8DE8\u94FE\u7684\u8D44\u4EA7\uFF0C\u7136\u540E\u4ECE\u8BE5\u8D44\u4EA7\u53EF\u7528\u7684\u94FE\u5BF9\u4E2D\u8FDB\u884C\u9009\u62E9\u3002"
|
|
6503
|
+
},
|
|
6504
|
+
bridgeChainPairSwapper: {
|
|
6505
|
+
title: "\u8BBE\u7F6E\u6E90\u94FE\u548C\u76EE\u6807\u94FE",
|
|
6506
|
+
description: "\u8DE8\u94FE\u8DEF\u7531\uFF08\u94FE\u5BF9\uFF09\u662F\u53CC\u5411\u7684\uFF0C\u5373\u6E90\u94FE\u548C\u76EE\u6807\u94FE\u53EF\u4EE5\u4E92\u6362\u3002\n \u4F7F\u7528\u201C\u21C4\u201D\u6309\u9215\u8BBE\u7F6E\u6E90\u94FE\u548C\u76EE\u6807\u94FE\u3002"
|
|
6507
|
+
},
|
|
6508
|
+
bridgeAmountRecipientInputs: {
|
|
6509
|
+
title: "\u8BBE\u7F6E\u91D1\u989D\u548C\u53EF\u9009\u6536\u6B3E\u4EBA",
|
|
6510
|
+
description: "\u8F93\u5165\u8981\u8DE8\u94FE\u7684\u91D1\u989D\uFF0C\u5E76\u53EF\u9009\u62E9\u6027\u5730\u6307\u5B9A\u6536\u6B3E\u4EBA\u5730\u5740\u3002\u82E5\u6536\u6B3E\u4EBA\u4E3A\u7A7A\uFF1A\u76EE\u6807\u94FE\u5730\u5740\u7B49\u4E8E\u6E90\u94FE\u4E0A\u7684\u53D1\u9001\u65B9\u5730\u5740\u3002"
|
|
6511
|
+
},
|
|
6512
|
+
bridgeEstimateQuoteButton: {
|
|
6513
|
+
title: "\u4F30\u7B97\u8DE8\u94FE\u8D39\u7528",
|
|
6514
|
+
description: "\u5728\u5B9E\u9645\u6267\u884C\u8DE8\u94FE\u524D\u83B7\u53D6\u9884\u4F30\u62A5\u4EF7\uFF0C\u5E2E\u52A9\u60A8\u5728\u7EE7\u7EED\u524D\u505A\u51FA\u660E\u667A\u51B3\u7B56\u3002"
|
|
6515
|
+
},
|
|
6516
|
+
bridgeEstimatedQuoteMenu: {
|
|
6517
|
+
title: "\u4F30\u7B97\u8DE8\u94FE\u62A5\u4EF7",
|
|
6518
|
+
description: "\u8BF7\u52A1\u5FC5\u68C0\u67E5\u8DE8\u94FE\u8BBE\u7F6E\u548C\u9884\u4F30\u62A5\u4EF7\uFF0C\u7136\u540E\u786E\u8BA4\u4EA4\u6613\u3002"
|
|
6519
|
+
}
|
|
6340
6520
|
}
|
|
6341
6521
|
},
|
|
6342
6522
|
receiveMenu: {
|
|
@@ -6366,7 +6546,12 @@ var init_zh = __esm({
|
|
|
6366
6546
|
exchangeRate: "\u6C47\u7387",
|
|
6367
6547
|
networkFee: "\u7F51\u7EDC\u8D39\u7528",
|
|
6368
6548
|
serviceFee: "\u670D\u52A1\u8D39",
|
|
6369
|
-
paymentMethod: "\u4ED8\u6B3E\u65B9\u5F0F"
|
|
6549
|
+
paymentMethod: "\u4ED8\u6B3E\u65B9\u5F0F",
|
|
6550
|
+
toAddress: {
|
|
6551
|
+
receiver: "\u6CE8\u610F\uFF01\u6536\u6B3E\u5730\u5740",
|
|
6552
|
+
message: "\u60A8\u5373\u5C06\u5411\u5916\u90E8\u5730\u5740\u8D2D\u4E70\u52A0\u5BC6\u8D27\u5E01\uFF0C\u800C\u975E\u60A8\u7684 embarkAI \u5730\u5740\u3002",
|
|
6553
|
+
suggestion: "\u8BF7\u786E\u8BA4\u8FD9\u662F\u60A8\u6B63\u786E\u7684\u9489\u5305\u5730\u5740\uFF0C\u5426\u5219\u60A8\u7684\u8D44\u91D1\u53EF\u80FD\u4E22\u5931\u3002"
|
|
6554
|
+
}
|
|
6370
6555
|
},
|
|
6371
6556
|
transactionHistory: {
|
|
6372
6557
|
details: "\u8BE6\u60C5"
|
|
@@ -6380,11 +6565,30 @@ var init_zh = __esm({
|
|
|
6380
6565
|
inputPlaceholder: {
|
|
6381
6566
|
selectCurrencies: "\u9009\u62E9\u52A0\u5BC6\u8D27\u5E01\u548C\u6CD5\u5E01",
|
|
6382
6567
|
providerMin: "{{provider}}\uFF1A\u6700\u4F4E\u9700\u8981 {{minimum}} {{currency}}"
|
|
6568
|
+
},
|
|
6569
|
+
onboarding: {
|
|
6570
|
+
buyMenu: {
|
|
6571
|
+
title: "\u8D2D\u4E70\u83DC\u5355",
|
|
6572
|
+
description: "\u5728\u8FD9\u91CC\u60A8\u53EF\u4EE5\u8D2D\u4E70\u52A0\u5BC6\u8D27\u5E01\u3002"
|
|
6573
|
+
},
|
|
6574
|
+
providerSelector: {
|
|
6575
|
+
title: "\u9009\u62E9\u670D\u52A1\u5546",
|
|
6576
|
+
description: "\u70B9\u51FB\u6B64\u5904\u9009\u62E9\u60A8\u8D2D\u4E70\u52A0\u5BC6\u8D27\u5E01\u7684\u670D\u52A1\u5546\u3002"
|
|
6577
|
+
},
|
|
6578
|
+
binanceMenu: {
|
|
6579
|
+
title: "\u8BBE\u7F6E\u8D2D\u4E70\u8BE6\u60C5",
|
|
6580
|
+
description: "\u70B9\u51FB\u6B64\u5904\u8BBE\u7F6E\u52A0\u5BC6\u8D27\u5E01\u8D2D\u4E70\u7684\u8BE6\u60C5\u3002"
|
|
6581
|
+
},
|
|
6582
|
+
binanceEstimate: {
|
|
6583
|
+
title: "\u786E\u8BA4\u8D2D\u4E70",
|
|
6584
|
+
description: "\u5728\u786E\u8BA4\u524D\u67E5\u770B\u8D2D\u4E70\u8BE6\u60C5\u3002"
|
|
6585
|
+
}
|
|
6383
6586
|
}
|
|
6384
6587
|
},
|
|
6385
6588
|
portfolioMenu: {
|
|
6386
6589
|
title: "\u60A8\u7684\u8D44\u4EA7",
|
|
6387
|
-
noAssets: "\u672A\u627E\u5230\u8D44\u4EA7"
|
|
6590
|
+
noAssets: "\u672A\u627E\u5230\u8D44\u4EA7",
|
|
6591
|
+
noBlockscout: "\u672A\u627E\u5230\u94FE {{chain}} \u7684 Blockscout API"
|
|
6388
6592
|
},
|
|
6389
6593
|
transactionsMenu: {
|
|
6390
6594
|
title: "\u4EA4\u6613\u8BB0\u5F55",
|
|
@@ -8461,7 +8665,9 @@ var init_onboarder = __esm({
|
|
|
8461
8665
|
tooltip: { title: "", description: "" },
|
|
8462
8666
|
setFrame: (tooltipStore) => set(tooltipStore),
|
|
8463
8667
|
mountIntoNode: document.body,
|
|
8464
|
-
setMountIntoNode: (mountIntoNode) => set({ mountIntoNode })
|
|
8668
|
+
setMountIntoNode: (mountIntoNode) => set({ mountIntoNode }),
|
|
8669
|
+
waitSecs: null,
|
|
8670
|
+
setWaitSecs: (waitSecs) => set({ waitSecs })
|
|
8465
8671
|
}));
|
|
8466
8672
|
Onboarder = class {
|
|
8467
8673
|
tour = null;
|
|
@@ -8509,9 +8715,12 @@ var init_onboarder = __esm({
|
|
|
8509
8715
|
useLayoutDataStore.getInitialState().setIsOnboarding(true);
|
|
8510
8716
|
useLayoutStore.getInitialState().setIsDialogForced(true);
|
|
8511
8717
|
const startElRef = this.elements.get(tour[0].elId)?.deref();
|
|
8512
|
-
|
|
8513
|
-
|
|
8514
|
-
|
|
8718
|
+
if (!!startElRef) {
|
|
8719
|
+
this.domObserver.observe(startElRef, { childList: true, subtree: true });
|
|
8720
|
+
this.resizeObserver.observe(startElRef);
|
|
8721
|
+
this.resizeObserver.observe(document.body);
|
|
8722
|
+
}
|
|
8723
|
+
useOnboardingStore.getState().setWaitSecs(tour[0].waitSecs || null);
|
|
8515
8724
|
}
|
|
8516
8725
|
endTour() {
|
|
8517
8726
|
this.tour = null;
|
|
@@ -8544,6 +8753,7 @@ var init_onboarder = __esm({
|
|
|
8544
8753
|
this.resizeObserver.observe(nextElRef);
|
|
8545
8754
|
this.resizeObserver.observe(document.body);
|
|
8546
8755
|
}
|
|
8756
|
+
useOnboardingStore.getState().setWaitSecs(nextStep.waitSecs || null);
|
|
8547
8757
|
}, 200);
|
|
8548
8758
|
}
|
|
8549
8759
|
/**
|
|
@@ -8555,6 +8765,10 @@ var init_onboarder = __esm({
|
|
|
8555
8765
|
if (!onboardingElementId || !elementRef) return;
|
|
8556
8766
|
this.elements.set(onboardingElementId, new WeakRef(elementRef));
|
|
8557
8767
|
}
|
|
8768
|
+
getCurrentStep() {
|
|
8769
|
+
if (!this.tour) return null;
|
|
8770
|
+
return this.tour[this.tourPointer];
|
|
8771
|
+
}
|
|
8558
8772
|
};
|
|
8559
8773
|
onboarder = new Onboarder();
|
|
8560
8774
|
}
|
|
@@ -8614,16 +8828,16 @@ function OnboardingOverlay() {
|
|
|
8614
8828
|
const colorMode = useLayoutStore((st) => st.colorMode);
|
|
8615
8829
|
const toolipElementRef = useRef9(null);
|
|
8616
8830
|
const {
|
|
8831
|
+
waitSecs,
|
|
8617
8832
|
elRect,
|
|
8618
8833
|
tooltip,
|
|
8619
8834
|
/** if embark is opened, onboard overlay has to be portaled into embark's dialog node to keep layers & pointer-events normal structure */
|
|
8620
|
-
mountIntoNode
|
|
8621
|
-
setMountIntoNode
|
|
8835
|
+
mountIntoNode
|
|
8622
8836
|
} = useOnboardingStore();
|
|
8623
8837
|
useEffect12(() => {
|
|
8624
8838
|
setTimeout(() => {
|
|
8625
8839
|
if (!page) {
|
|
8626
|
-
setMountIntoNode(document.body);
|
|
8840
|
+
useOnboardingStore.getState().setMountIntoNode(document.body);
|
|
8627
8841
|
return;
|
|
8628
8842
|
}
|
|
8629
8843
|
const lastMountIntoNode = useOnboardingStore.getState().mountIntoNode;
|
|
@@ -8631,7 +8845,7 @@ function OnboardingOverlay() {
|
|
|
8631
8845
|
return;
|
|
8632
8846
|
}
|
|
8633
8847
|
const embarkUIContainer = document.querySelector('[data-purpose="embarkai-ui-container"]');
|
|
8634
|
-
setMountIntoNode(embarkUIContainer);
|
|
8848
|
+
useOnboardingStore.getState().setMountIntoNode(embarkUIContainer);
|
|
8635
8849
|
}, 0);
|
|
8636
8850
|
}, [page]);
|
|
8637
8851
|
const [continueCountdown, setContinueCountdown] = useState5(null);
|
|
@@ -8645,16 +8859,13 @@ function OnboardingOverlay() {
|
|
|
8645
8859
|
const tt = {
|
|
8646
8860
|
...getTooltipXPos({ ...elRect, isMobileView, expandValue }),
|
|
8647
8861
|
...getTooltipYPos({ ...elRect, isMobileView, expandValue, ttCurrentHeight: toolipElementRef.current?.clientHeight })
|
|
8648
|
-
// y: isMobileView
|
|
8649
|
-
// ? elRect.y - expandValue * 2 - toolipElementRef.current?.clientHeight
|
|
8650
|
-
// : elRect.y + elRect.height + expandValue
|
|
8651
8862
|
};
|
|
8652
8863
|
useEffect12(() => {
|
|
8653
|
-
|
|
8864
|
+
if (!waitSecs) return;
|
|
8865
|
+
setContinueCountdown(waitSecs);
|
|
8654
8866
|
const countdownInterval = setInterval(() => {
|
|
8655
8867
|
setContinueCountdown((prev) => {
|
|
8656
|
-
if (prev === null)
|
|
8657
|
-
if (prev <= 1) {
|
|
8868
|
+
if (prev <= 1 || prev === null) {
|
|
8658
8869
|
clearInterval(countdownInterval);
|
|
8659
8870
|
return null;
|
|
8660
8871
|
}
|
|
@@ -8662,8 +8873,9 @@ function OnboardingOverlay() {
|
|
|
8662
8873
|
});
|
|
8663
8874
|
}, 1e3);
|
|
8664
8875
|
return () => clearInterval(countdownInterval);
|
|
8665
|
-
}, [
|
|
8876
|
+
}, [waitSecs]);
|
|
8666
8877
|
if (!mountIntoNode) return null;
|
|
8878
|
+
const tourStepActions = onboarder.getCurrentStep()?.actions;
|
|
8667
8879
|
return createPortal(
|
|
8668
8880
|
/* @__PURE__ */ jsxs17(
|
|
8669
8881
|
"div",
|
|
@@ -8731,9 +8943,32 @@ function OnboardingOverlay() {
|
|
|
8731
8943
|
borderRadius: isMobileView || tt.isOverflowX ? "var(--ui-kit-bdrs)" : "0 0 var(--ui-kit-bdrs) var(--ui-kit-bdrs)"
|
|
8732
8944
|
},
|
|
8733
8945
|
children: [
|
|
8734
|
-
/* @__PURE__ */ jsx21("p", {
|
|
8735
|
-
|
|
8736
|
-
|
|
8946
|
+
/* @__PURE__ */ jsx21("p", {
|
|
8947
|
+
className: "font-bold",
|
|
8948
|
+
//@ts-expect-error i18n dynamic key typing
|
|
8949
|
+
children: t(tooltip.title)
|
|
8950
|
+
}),
|
|
8951
|
+
/* @__PURE__ */ jsx21("p", {
|
|
8952
|
+
className: "whitespace-pre-line",
|
|
8953
|
+
//@ts-expect-error i18n dynamic key typing
|
|
8954
|
+
children: t(tooltip.description)
|
|
8955
|
+
}),
|
|
8956
|
+
!!tourStepActions?.length ? /* @__PURE__ */ jsx21("div", { className: "flex grid grid-cols-2 gap-[var(--ui-kit-gap)]", children: tourStepActions.map(({ caption, onClick }, index) => /* @__PURE__ */ jsxs17(
|
|
8957
|
+
Button,
|
|
8958
|
+
{
|
|
8959
|
+
variant: "default",
|
|
8960
|
+
size: "medium",
|
|
8961
|
+
className: "w-full",
|
|
8962
|
+
onClick,
|
|
8963
|
+
disabled: continueCountdown !== null,
|
|
8964
|
+
children: [
|
|
8965
|
+
continueCountdown !== null ? /* @__PURE__ */ jsx21(LoaderIcon, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ jsx21(ChevronRightIcon, { className: "h-4 w-4" }),
|
|
8966
|
+
// @ts-expect-error i18n dynamic key typing
|
|
8967
|
+
t(caption)
|
|
8968
|
+
]
|
|
8969
|
+
},
|
|
8970
|
+
index
|
|
8971
|
+
)) }) : /* @__PURE__ */ jsxs17(
|
|
8737
8972
|
Button,
|
|
8738
8973
|
{
|
|
8739
8974
|
variant: "default-glow",
|
|
@@ -8743,7 +8978,7 @@ function OnboardingOverlay() {
|
|
|
8743
8978
|
disabled: continueCountdown !== null,
|
|
8744
8979
|
children: [
|
|
8745
8980
|
continueCountdown !== null ? /* @__PURE__ */ jsx21(LoaderIcon, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ jsx21(ChevronRightIcon, { className: "h-4 w-4" }),
|
|
8746
|
-
String(t("passport:common.
|
|
8981
|
+
String(t("passport:common.continue")).toUpperCase(),
|
|
8747
8982
|
" ",
|
|
8748
8983
|
continueCountdown !== null && continueCountdown
|
|
8749
8984
|
]
|
|
@@ -8759,7 +8994,7 @@ function OnboardingOverlay() {
|
|
|
8759
8994
|
mountIntoNode
|
|
8760
8995
|
);
|
|
8761
8996
|
}
|
|
8762
|
-
var EXPAND,
|
|
8997
|
+
var EXPAND, TOOLTIP_MIN_WIDTH;
|
|
8763
8998
|
var init_OnboardingOverlay = __esm({
|
|
8764
8999
|
"src/internal/components/Onboarding/OnboardingOverlay.tsx"() {
|
|
8765
9000
|
init_i18n();
|
|
@@ -8769,7 +9004,6 @@ var init_OnboardingOverlay = __esm({
|
|
|
8769
9004
|
init_button();
|
|
8770
9005
|
init_onboarder();
|
|
8771
9006
|
EXPAND = 16;
|
|
8772
|
-
NEXT_COUNTDOWN = 4;
|
|
8773
9007
|
TOOLTIP_MIN_WIDTH = 256;
|
|
8774
9008
|
}
|
|
8775
9009
|
});
|
|
@@ -9829,8 +10063,9 @@ var init_onboarding_setup = __esm({
|
|
|
9829
10063
|
BUY_MENU_BINANCE_TOUR = [
|
|
9830
10064
|
{
|
|
9831
10065
|
elId: "buymenu-page" /* buymenu */,
|
|
9832
|
-
title: "
|
|
9833
|
-
description: "
|
|
10066
|
+
title: "passport:buyMenu.onboarding.buyMenu.title",
|
|
10067
|
+
description: "passport:buyMenu.onboarding.buyMenu.description",
|
|
10068
|
+
waitSecs: 6,
|
|
9834
10069
|
onNext: () => {
|
|
9835
10070
|
const { setRampProvider, rampProvider } = useBuyMenuStore.getState();
|
|
9836
10071
|
if (rampProvider !== "binance") setRampProvider("binance");
|
|
@@ -9838,15 +10073,13 @@ var init_onboarding_setup = __esm({
|
|
|
9838
10073
|
},
|
|
9839
10074
|
{
|
|
9840
10075
|
elId: "buymenu-provider-selector" /* providerSelector */,
|
|
9841
|
-
title: "
|
|
9842
|
-
description: "
|
|
9843
|
-
onNext: () => {
|
|
9844
|
-
}
|
|
10076
|
+
title: "passport:buyMenu.onboarding.providerSelector.title",
|
|
10077
|
+
description: "passport:buyMenu.onboarding.providerSelector.description"
|
|
9845
10078
|
},
|
|
9846
10079
|
{
|
|
9847
10080
|
elId: "buymenu-binance-menu" /* binanceMenu */,
|
|
9848
|
-
title: "
|
|
9849
|
-
description: "
|
|
10081
|
+
title: "passport:buyMenu.onboarding.binanceMenu.title",
|
|
10082
|
+
description: "passport:buyMenu.onboarding.binanceMenu.description",
|
|
9850
10083
|
onNext: () => {
|
|
9851
10084
|
useBinanceStore.getState().setQuoteData({
|
|
9852
10085
|
totalAmount: "0.12345678",
|
|
@@ -9862,8 +10095,8 @@ var init_onboarding_setup = __esm({
|
|
|
9862
10095
|
},
|
|
9863
10096
|
{
|
|
9864
10097
|
elId: "buymenu-binance-estimate" /* binanceEstimate */,
|
|
9865
|
-
title: "
|
|
9866
|
-
description: "
|
|
10098
|
+
title: "passport:buyMenu.onboarding.binanceEstimate.title",
|
|
10099
|
+
description: "passport:buyMenu.onboarding.binanceEstimate.description",
|
|
9867
10100
|
onNext: () => {
|
|
9868
10101
|
useBuyMenuStore.getState().setIsProviderSummary(false);
|
|
9869
10102
|
useBinanceStore.getState().setQuoteData(null);
|
|
@@ -9871,10 +10104,8 @@ var init_onboarding_setup = __esm({
|
|
|
9871
10104
|
},
|
|
9872
10105
|
{
|
|
9873
10106
|
elId: "buymenu-tour-button" /* tourButton */,
|
|
9874
|
-
title: "
|
|
9875
|
-
description:
|
|
9876
|
-
onNext: () => {
|
|
9877
|
-
}
|
|
10107
|
+
title: "passport:common.onboarding.tourButton.title",
|
|
10108
|
+
description: "passport:common.onboarding.tourButton.description"
|
|
9878
10109
|
}
|
|
9879
10110
|
];
|
|
9880
10111
|
}
|
|
@@ -11663,7 +11894,7 @@ var init_useHandleInputAmount = __esm({
|
|
|
11663
11894
|
});
|
|
11664
11895
|
|
|
11665
11896
|
// src/internal/components/BuyMenu/BuyMenu.tsx
|
|
11666
|
-
import { ArrowLeft as ArrowLeft3,
|
|
11897
|
+
import { ArrowLeft as ArrowLeft3, CircleQuestionMarkIcon } from "lucide-react";
|
|
11667
11898
|
import { Fragment as Fragment14, jsx as jsx46, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
11668
11899
|
function BuyMenu() {
|
|
11669
11900
|
const { t } = useT();
|
|
@@ -11751,7 +11982,7 @@ function BuyMenu() {
|
|
|
11751
11982
|
size: "icon",
|
|
11752
11983
|
className: "flex-none",
|
|
11753
11984
|
onClick: () => onboarder.startTour(BUY_MENU_BINANCE_TOUR),
|
|
11754
|
-
children: /* @__PURE__ */ jsx46(
|
|
11985
|
+
children: /* @__PURE__ */ jsx46(CircleQuestionMarkIcon, { className: "h-4 w-4" })
|
|
11755
11986
|
}
|
|
11756
11987
|
),
|
|
11757
11988
|
/* @__PURE__ */ jsx46(
|
|
@@ -19184,7 +19415,7 @@ var init_useConnectedApps = __esm({
|
|
|
19184
19415
|
|
|
19185
19416
|
// src/internal/components/SecurityMenu/ConnectedApps/ConnectedApps.tsx
|
|
19186
19417
|
import dayjs5 from "dayjs";
|
|
19187
|
-
import { AppWindowMac, ExternalLinkIcon as ExternalLinkIcon2, InfoIcon as
|
|
19418
|
+
import { AppWindowMac, ExternalLinkIcon as ExternalLinkIcon2, InfoIcon as InfoIcon4, LoaderIcon as LoaderIcon10, ShieldBanIcon, ShieldCheckIcon } from "lucide-react";
|
|
19188
19419
|
import { useEffect as useEffect35 } from "react";
|
|
19189
19420
|
import { Fragment as Fragment32, jsx as jsx87, jsxs as jsxs81 } from "react/jsx-runtime";
|
|
19190
19421
|
function Application(props) {
|
|
@@ -19291,7 +19522,7 @@ function ConnectedApps() {
|
|
|
19291
19522
|
}, [connectedApps, isConnectedAppsLoading]);
|
|
19292
19523
|
if (!isConnectedAppsLoading && connectedApps.length === 0)
|
|
19293
19524
|
return /* @__PURE__ */ jsxs81(Highlight, { type: "info", className: "flex gap-[var(--ui-kit-gap)] ", children: [
|
|
19294
|
-
/* @__PURE__ */ jsx87(
|
|
19525
|
+
/* @__PURE__ */ jsx87(InfoIcon4, { className: "w-4 h-4" }),
|
|
19295
19526
|
/* @__PURE__ */ jsx87("span", { children: t("passport:securityMenu.connectedApps.noConnectedApps") })
|
|
19296
19527
|
] });
|
|
19297
19528
|
return /* @__PURE__ */ jsxs81(Fragment32, { children: [
|
|
@@ -20041,6 +20272,7 @@ function SenderSelector(props) {
|
|
|
20041
20272
|
pendingWalletRef.current = null;
|
|
20042
20273
|
loginDirectWallet(pendingProfile);
|
|
20043
20274
|
}, [directWalletIsConnected, directWalletAddress]);
|
|
20275
|
+
const isWalletProfileAvailable = !!directWalletProfile?.meta?.walletName && !!directWalletProfile?.externalId;
|
|
20044
20276
|
return /* @__PURE__ */ jsxs87("div", { className: "w-full flex flex-col gap-[var(--ui-kit-gap)]", children: [
|
|
20045
20277
|
bridgeSenders.map((sender) => /* @__PURE__ */ jsxs87(
|
|
20046
20278
|
Button,
|
|
@@ -20084,6 +20316,21 @@ function SenderSelector(props) {
|
|
|
20084
20316
|
},
|
|
20085
20317
|
`sender-${sender.address}`
|
|
20086
20318
|
)),
|
|
20319
|
+
!isWalletProfileAvailable && /* @__PURE__ */ jsxs87(Highlight, { type: "info", className: "flex flex-col w-full gap-[var(--ui-kit-gap)]", children: [
|
|
20320
|
+
/* @__PURE__ */ jsx93("span", { className: "whitespace-pre-line", children: t("passport:bridgeMenu.onboarding.bridgeSenderWalletSelector.description") }),
|
|
20321
|
+
/* @__PURE__ */ jsx93(
|
|
20322
|
+
Button,
|
|
20323
|
+
{
|
|
20324
|
+
variant: "default",
|
|
20325
|
+
size: "large",
|
|
20326
|
+
className: "w-full",
|
|
20327
|
+
onClick: () => {
|
|
20328
|
+
useLayoutDataStore.getState().setPage("manage-wallet" /* MANAGE_WALLET */);
|
|
20329
|
+
},
|
|
20330
|
+
children: t("passport:bridgeMenu.actions.addExternalWalletProfile")
|
|
20331
|
+
}
|
|
20332
|
+
)
|
|
20333
|
+
] }),
|
|
20087
20334
|
walletMessage && /* @__PURE__ */ jsxs87(Highlight, { type: "info", className: "flex flex-col w-full gap-[var(--ui-kit-gap)]", children: [
|
|
20088
20335
|
/* @__PURE__ */ jsx93("span", { children: walletMessage }),
|
|
20089
20336
|
/* @__PURE__ */ jsx93(
|
|
@@ -20565,11 +20812,13 @@ function getAssetBalance(asset) {
|
|
|
20565
20812
|
return Number(formatUnits7(BigInt(asset.balance || "0"), asset.decimals || 18));
|
|
20566
20813
|
}
|
|
20567
20814
|
function isOririnChainEmbarkSupported(originChain) {
|
|
20815
|
+
const activeChainId = useSession.getState().activeChainId;
|
|
20568
20816
|
const supportedChain = [...SUPPORTED_CHAINS2].map(([chainId]) => chainId);
|
|
20569
|
-
return supportedChain.includes(CHAINS_UI_META[originChain].chainID);
|
|
20817
|
+
return supportedChain.includes(CHAINS_UI_META[originChain].chainID) && activeChainId === CHAINS_UI_META[originChain].chainID;
|
|
20570
20818
|
}
|
|
20571
20819
|
var init_utils9 = __esm({
|
|
20572
20820
|
"src/internal/components/SendMenu/hyperbridge/utils.ts"() {
|
|
20821
|
+
init_SessionContext();
|
|
20573
20822
|
init_chains();
|
|
20574
20823
|
}
|
|
20575
20824
|
});
|
|
@@ -20915,7 +21164,7 @@ function useMenuTitle(warpRoutes) {
|
|
|
20915
21164
|
const updateMenuTitle = useFlowSelectorStore.getState().setMenuTitle;
|
|
20916
21165
|
switch (true) {
|
|
20917
21166
|
case bridgeStep === "sender-selector":
|
|
20918
|
-
updateMenuTitle(t("passport:bridgeMenu.labels.
|
|
21167
|
+
updateMenuTitle(t("passport:bridgeMenu.labels.selectSender"));
|
|
20919
21168
|
break;
|
|
20920
21169
|
case bridgeStep === "select-token":
|
|
20921
21170
|
updateMenuTitle(t("passport:bridgeMenu.labels.selectToken"));
|
|
@@ -20947,6 +21196,161 @@ var init_useMenuTitle = __esm({
|
|
|
20947
21196
|
}
|
|
20948
21197
|
});
|
|
20949
21198
|
|
|
21199
|
+
// src/internal/components/SendMenu/send/useSendStore.ts
|
|
21200
|
+
import { create as create15 } from "zustand";
|
|
21201
|
+
var useSendStore;
|
|
21202
|
+
var init_useSendStore = __esm({
|
|
21203
|
+
"src/internal/components/SendMenu/send/useSendStore.ts"() {
|
|
21204
|
+
init_useFlowSelector();
|
|
21205
|
+
useSendStore = create15((set) => ({
|
|
21206
|
+
recipient: "",
|
|
21207
|
+
//
|
|
21208
|
+
amount: "",
|
|
21209
|
+
selectedAsset: null,
|
|
21210
|
+
//
|
|
21211
|
+
txStep: "input",
|
|
21212
|
+
//
|
|
21213
|
+
// sendError: null,
|
|
21214
|
+
//
|
|
21215
|
+
setRecipient: (recipient) => {
|
|
21216
|
+
useFlowSelectorStore.getState().setError(null);
|
|
21217
|
+
set({ recipient });
|
|
21218
|
+
},
|
|
21219
|
+
//
|
|
21220
|
+
setAmount: (amount) => {
|
|
21221
|
+
useFlowSelectorStore.getState().setError(null);
|
|
21222
|
+
set({ amount });
|
|
21223
|
+
},
|
|
21224
|
+
setSelectedAsset: (selectedAsset) => {
|
|
21225
|
+
useFlowSelectorStore.getState().setError(null);
|
|
21226
|
+
set({ selectedAsset });
|
|
21227
|
+
},
|
|
21228
|
+
//
|
|
21229
|
+
setTxStep: (txStep) => {
|
|
21230
|
+
useFlowSelectorStore.getState().setError(null);
|
|
21231
|
+
useFlowSelectorStore.getState().setRenderKey(`send-${txStep}-${Date.now()}`);
|
|
21232
|
+
set({ txStep });
|
|
21233
|
+
}
|
|
21234
|
+
}));
|
|
21235
|
+
}
|
|
21236
|
+
});
|
|
21237
|
+
|
|
21238
|
+
// src/internal/components/SendMenu/onboarding.setup.ts
|
|
21239
|
+
var TOUR_SEND_ASSET, TOUR_BRIDGE_QUOTE, SEND_MENU_TOUR, BRIDGE_MENU_TOUR;
|
|
21240
|
+
var init_onboarding_setup2 = __esm({
|
|
21241
|
+
"src/internal/components/SendMenu/onboarding.setup.ts"() {
|
|
21242
|
+
init_useBridgeStore();
|
|
21243
|
+
init_useSendStore();
|
|
21244
|
+
TOUR_SEND_ASSET = {
|
|
21245
|
+
name: "USDT",
|
|
21246
|
+
symbol: "USDT",
|
|
21247
|
+
address: "0xee7Fc418f5659a366b548b4E205d374C1F0B46e7",
|
|
21248
|
+
balance: "1000",
|
|
21249
|
+
formattedBalance: "1000",
|
|
21250
|
+
type: "erc20"
|
|
21251
|
+
};
|
|
21252
|
+
TOUR_BRIDGE_QUOTE = {
|
|
21253
|
+
amount: "123",
|
|
21254
|
+
igpFee: "0.123",
|
|
21255
|
+
localFee: "0.456",
|
|
21256
|
+
igpSymbol: "USDT",
|
|
21257
|
+
localSymbol: "USDT"
|
|
21258
|
+
};
|
|
21259
|
+
SEND_MENU_TOUR = [
|
|
21260
|
+
{
|
|
21261
|
+
elId: "sendmenu-page" /* sendMenu */,
|
|
21262
|
+
title: "passport:sendMenu.onboarding.sendMenu.title",
|
|
21263
|
+
description: "passport:sendMenu.onboarding.sendMenu.description",
|
|
21264
|
+
waitSecs: 4,
|
|
21265
|
+
onNext: () => {
|
|
21266
|
+
const { setAmount, setRecipient, setSelectedAsset, setTxStep } = useSendStore.getState();
|
|
21267
|
+
setSelectedAsset(TOUR_SEND_ASSET);
|
|
21268
|
+
setAmount("123");
|
|
21269
|
+
setRecipient("0x1234567890123456789012345678901234567890");
|
|
21270
|
+
setTxStep("confirm");
|
|
21271
|
+
}
|
|
21272
|
+
},
|
|
21273
|
+
{
|
|
21274
|
+
elId: "sendmenu-crypto-summary" /* sendCryptoSummary */,
|
|
21275
|
+
title: "passport:sendMenu.onboarding.sendCryptoSummary.title",
|
|
21276
|
+
description: "passport:sendMenu.onboarding.sendCryptoSummary.description",
|
|
21277
|
+
onNext: () => {
|
|
21278
|
+
const { setAmount, setRecipient, setSelectedAsset, setTxStep } = useSendStore.getState();
|
|
21279
|
+
setTxStep("input");
|
|
21280
|
+
setRecipient("");
|
|
21281
|
+
setAmount("");
|
|
21282
|
+
setSelectedAsset(null);
|
|
21283
|
+
}
|
|
21284
|
+
},
|
|
21285
|
+
{
|
|
21286
|
+
elId: "sendmenu-tour-button" /* tourButton */,
|
|
21287
|
+
title: "passport:common.onboarding.tourButton.title",
|
|
21288
|
+
description: "passport:common.onboarding.tourButton.description"
|
|
21289
|
+
}
|
|
21290
|
+
];
|
|
21291
|
+
BRIDGE_MENU_TOUR = [
|
|
21292
|
+
{
|
|
21293
|
+
elId: "sendmenu-page" /* sendMenu */,
|
|
21294
|
+
title: "passport:bridgeMenu.onboarding.bridgeMenu.title",
|
|
21295
|
+
description: "passport:bridgeMenu.onboarding.bridgeMenu.description",
|
|
21296
|
+
waitSecs: 5,
|
|
21297
|
+
onNext: () => {
|
|
21298
|
+
const { setHyperRoute, setBridgeAssetSymbol, setOriginChain, setDestinationChain } = useBridgeStore.getState();
|
|
21299
|
+
setHyperRoute("USDT/ethereum-lumiaprism");
|
|
21300
|
+
setBridgeAssetSymbol("USDT");
|
|
21301
|
+
setOriginChain("lumiaprism");
|
|
21302
|
+
setDestinationChain("ethereum");
|
|
21303
|
+
}
|
|
21304
|
+
},
|
|
21305
|
+
{
|
|
21306
|
+
elId: "bridgemenu-sender-wallet-selector" /* bridgeSenderWalletSelector */,
|
|
21307
|
+
title: "passport:bridgeMenu.onboarding.bridgeSenderWalletSelector.title",
|
|
21308
|
+
description: "passport:bridgeMenu.onboarding.bridgeSenderWalletSelector.description"
|
|
21309
|
+
},
|
|
21310
|
+
{
|
|
21311
|
+
elId: "bridgemenu-crypto-menu-asset-selector" /* bridgeCryptoAssetSelector */,
|
|
21312
|
+
title: "passport:bridgeMenu.onboarding.bridgeCryptoAssetSelector.title",
|
|
21313
|
+
description: "passport:bridgeMenu.onboarding.bridgeCryptoAssetSelector.description"
|
|
21314
|
+
},
|
|
21315
|
+
{
|
|
21316
|
+
elId: "bridgemenu-crypto-menu-chain-pair-swapper" /* bridgeChainPairSwapper */,
|
|
21317
|
+
title: "passport:bridgeMenu.onboarding.bridgeChainPairSwapper.title",
|
|
21318
|
+
description: "passport:bridgeMenu.onboarding.bridgeChainPairSwapper.description"
|
|
21319
|
+
},
|
|
21320
|
+
{
|
|
21321
|
+
elId: "bridgemenu-crypto-menu-amount-recipient-inputs" /* bridgeAmountRecipientInputs */,
|
|
21322
|
+
title: "passport:bridgeMenu.onboarding.bridgeAmountRecipientInputs.title",
|
|
21323
|
+
description: "passport:bridgeMenu.onboarding.bridgeAmountRecipientInputs.description"
|
|
21324
|
+
},
|
|
21325
|
+
{
|
|
21326
|
+
elId: "bridgemenu-crypto-menu-estimate-quote-button" /* bridgeEstimateQuoteButton */,
|
|
21327
|
+
title: "passport:bridgeMenu.onboarding.bridgeEstimateQuoteButton.title",
|
|
21328
|
+
description: "passport:bridgeMenu.onboarding.bridgeEstimateQuoteButton.description",
|
|
21329
|
+
onNext: () => {
|
|
21330
|
+
const { setQuote, setBridgeStep } = useBridgeStore.getState();
|
|
21331
|
+
setQuote(TOUR_BRIDGE_QUOTE);
|
|
21332
|
+
setBridgeStep("confirm");
|
|
21333
|
+
}
|
|
21334
|
+
},
|
|
21335
|
+
{
|
|
21336
|
+
elId: "bridgemenu-crypto-menu-estimate-details-menu" /* bridgeEstimatedQuoteMenu */,
|
|
21337
|
+
title: "passport:bridgeMenu.onboarding.bridgeEstimatedQuoteMenu.title",
|
|
21338
|
+
description: "passport:bridgeMenu.onboarding.bridgeEstimatedQuoteMenu.description",
|
|
21339
|
+
onNext: () => {
|
|
21340
|
+
const { setQuote, setBridgeStep } = useBridgeStore.getState();
|
|
21341
|
+
setQuote(null);
|
|
21342
|
+
setBridgeStep("select");
|
|
21343
|
+
}
|
|
21344
|
+
},
|
|
21345
|
+
{
|
|
21346
|
+
elId: "sendmenu-tour-button" /* tourButton */,
|
|
21347
|
+
title: "passport:common.onboarding.tourButton.title",
|
|
21348
|
+
description: "passport:common.onboarding.tourButton.description"
|
|
21349
|
+
}
|
|
21350
|
+
];
|
|
21351
|
+
}
|
|
21352
|
+
});
|
|
21353
|
+
|
|
20950
21354
|
// src/internal/components/SendMenu/hyperbridge/components/ResolveChainIcon.tsx
|
|
20951
21355
|
import { jsx as jsx96 } from "react/jsx-runtime";
|
|
20952
21356
|
function ResolveChainIcon(props) {
|
|
@@ -20970,6 +21374,7 @@ function useBridgeBalance(hyperlaneWarpRoutes) {
|
|
|
20970
21374
|
const qc = useQueryClient23();
|
|
20971
21375
|
const { t } = useT();
|
|
20972
21376
|
const address = useSession((st) => st.address);
|
|
21377
|
+
const activeChainId = useSession((st) => st.activeChainId);
|
|
20973
21378
|
const directWalletAddress = useExternalWalletStore((st) => st.externalAddress);
|
|
20974
21379
|
const directWalletChainId = useExternalWalletStore((st) => st.externalChainId);
|
|
20975
21380
|
const { switchChainAsync } = useSwitchChain2();
|
|
@@ -21092,7 +21497,7 @@ function useBridgeBalance(hyperlaneWarpRoutes) {
|
|
|
21092
21497
|
break;
|
|
21093
21498
|
}
|
|
21094
21499
|
}, [bridgeSender, originChain, directWalletChainId, switchChainAsync]);
|
|
21095
|
-
const embarkBalance = embarkTokenBalanace ? getAssetBalance(embarkTokenBalanace) : 0;
|
|
21500
|
+
const embarkBalance = CHAINS_UI_META[originChain].chainID === activeChainId && embarkTokenBalanace ? getAssetBalance(embarkTokenBalanace) : 0;
|
|
21096
21501
|
const externalWalletBalance = isSelectedTokenNative ? formatUnits8(externalNativeBalanceData?.value || BigInt(0), externalNativeBalanceData?.decimals || 18) : formatUnits8(externalBalanceData?.value || BigInt(0), externalBalanceData?.decimals || 18);
|
|
21097
21502
|
return {
|
|
21098
21503
|
routeTokenBalance: isEmbarkSender ? embarkBalance : externalWalletBalance,
|
|
@@ -21150,83 +21555,91 @@ function SelectStep(props) {
|
|
|
21150
21555
|
const isQuoteEstimationDisabled = isQuoteEstimating || !hyperlaneWarpRoutes.length || !selectedSender || !originChain || !destinationChain || !hyperRoute || isFalsyAmount || isBalanceInsufficient;
|
|
21151
21556
|
return /* @__PURE__ */ jsxs90("div", { className: "w-full flex flex-col gap-[var(--ui-kit-gap)] items-center", children: [
|
|
21152
21557
|
/* @__PURE__ */ jsxs90("div", { className: "w-full flex flex-col gap-[var(--ui-kit-gap)]", children: [
|
|
21153
|
-
/* @__PURE__ */ jsx97(
|
|
21154
|
-
"div",
|
|
21155
|
-
{
|
|
21156
|
-
className: cn(
|
|
21157
|
-
"flex items-center justify-between gap-[var(--ui-kit-gap)]",
|
|
21158
|
-
"text-[10px] text-[var(--ui-kit-fg-muted)] leading-4"
|
|
21159
|
-
),
|
|
21160
|
-
children: /* @__PURE__ */ jsx97("span", { className: "block text-[10px] text-[var(--ui-kit-fg-muted)]", children: t("passport:bridgeMenu.labels.sender") })
|
|
21161
|
-
}
|
|
21162
|
-
),
|
|
21163
21558
|
/* @__PURE__ */ jsxs90(
|
|
21164
|
-
|
|
21559
|
+
"div",
|
|
21165
21560
|
{
|
|
21166
|
-
|
|
21167
|
-
|
|
21168
|
-
className: "w-full justify-between",
|
|
21169
|
-
onClick: () => {
|
|
21170
|
-
useFlowSelectorStore.getState().setError(null);
|
|
21171
|
-
useBridgeStore.getState().setBridgeStep("sender-selector");
|
|
21172
|
-
},
|
|
21561
|
+
ref: (inst) => onboarder.registerElement("bridgemenu-sender-wallet-selector" /* bridgeSenderWalletSelector */, inst),
|
|
21562
|
+
className: "flex flex-col gap-[var(--ui-kit-gap)]",
|
|
21173
21563
|
children: [
|
|
21174
|
-
/* @__PURE__ */
|
|
21175
|
-
|
|
21176
|
-
|
|
21177
|
-
|
|
21178
|
-
|
|
21179
|
-
|
|
21180
|
-
|
|
21181
|
-
|
|
21182
|
-
|
|
21564
|
+
/* @__PURE__ */ jsx97("span", { className: "block text-[10px] text-[var(--ui-kit-fg-muted)] leading-4", children: t("passport:bridgeMenu.labels.selectSender") }),
|
|
21565
|
+
/* @__PURE__ */ jsxs90(
|
|
21566
|
+
Button,
|
|
21567
|
+
{
|
|
21568
|
+
disabled: !hyperlaneWarpRoutes.length || isQuoteEstimating,
|
|
21569
|
+
variant: "secondary",
|
|
21570
|
+
className: "w-full justify-between",
|
|
21571
|
+
onClick: () => {
|
|
21572
|
+
useFlowSelectorStore.getState().setError(null);
|
|
21573
|
+
useBridgeStore.getState().setBridgeStep("sender-selector");
|
|
21574
|
+
},
|
|
21575
|
+
children: [
|
|
21576
|
+
/* @__PURE__ */ jsxs90("div", { className: "flex items-center gap-[var(--ui-kit-gap)]", children: [
|
|
21577
|
+
selectedSender?.Icon && /* @__PURE__ */ jsx97(selectedSender.Icon, { className: "w-6 h-6" }),
|
|
21578
|
+
/* @__PURE__ */ jsx97("span", { children: selectedSender?.name || "N / A" })
|
|
21579
|
+
] }),
|
|
21580
|
+
selectedSender?.address && /* @__PURE__ */ jsxs90("span", { className: "block text-[10px] font-mono!", children: [
|
|
21581
|
+
selectedSender.address.slice(0, 6),
|
|
21582
|
+
"...",
|
|
21583
|
+
selectedSender.address.slice(-4)
|
|
21584
|
+
] })
|
|
21585
|
+
]
|
|
21586
|
+
}
|
|
21587
|
+
)
|
|
21183
21588
|
]
|
|
21184
21589
|
}
|
|
21185
21590
|
),
|
|
21186
|
-
/* @__PURE__ */ jsxs90("div", { className: "flex items-center justify-between gap-[var(--ui-kit-gap)] text-[10px]", children: [
|
|
21187
|
-
/* @__PURE__ */ jsx97("span", { className: "text-[var(--ui-kit-fg-muted)]", children: t("passport:bridgeMenu.labels.selectToken") }),
|
|
21188
|
-
/* @__PURE__ */ jsx97("span", { className: "w-4 h-4" }),
|
|
21189
|
-
/* @__PURE__ */ jsxs90("span", { className: "flex items-center gap-[var(--ui-kit-gap)] leading-4", children: [
|
|
21190
|
-
/* @__PURE__ */ jsxs90("span", { className: "text-[var(--ui-kit-fg-muted)]", children: [
|
|
21191
|
-
t("passport:common.balance"),
|
|
21192
|
-
": "
|
|
21193
|
-
] }),
|
|
21194
|
-
isRouteTokenBalanceLoading && /* @__PURE__ */ jsx97(LoaderIcon12, { className: "w-4 h-4 animate-spin text-[var(--ui-kit-fg-muted)]" }),
|
|
21195
|
-
!isRouteTokenBalanceLoading && /* @__PURE__ */ jsxs90("span", { className: cn("font-semibold", { "text-[var(--ui-kit-bg-error)]": isBalanceInsufficient }), children: [
|
|
21196
|
-
formatPrice(Number(routeTokenBalance || 0)),
|
|
21197
|
-
" ",
|
|
21198
|
-
selectedWarpRoute?.symbol
|
|
21199
|
-
] })
|
|
21200
|
-
] })
|
|
21201
|
-
] }),
|
|
21202
21591
|
/* @__PURE__ */ jsxs90(
|
|
21203
|
-
|
|
21592
|
+
"div",
|
|
21204
21593
|
{
|
|
21205
|
-
|
|
21206
|
-
|
|
21207
|
-
className: "w-full justify-between",
|
|
21208
|
-
onClick: () => {
|
|
21209
|
-
useFlowSelectorStore.getState().setError(null);
|
|
21210
|
-
useBridgeStore.getState().setBridgeStep("select-token");
|
|
21211
|
-
},
|
|
21594
|
+
ref: (inst) => onboarder.registerElement("bridgemenu-crypto-menu-asset-selector" /* bridgeCryptoAssetSelector */, inst),
|
|
21595
|
+
className: "flex flex-col gap-[var(--ui-kit-gap)]",
|
|
21212
21596
|
children: [
|
|
21213
|
-
|
|
21214
|
-
/* @__PURE__ */ jsx97(
|
|
21215
|
-
/* @__PURE__ */
|
|
21216
|
-
|
|
21217
|
-
|
|
21218
|
-
|
|
21597
|
+
/* @__PURE__ */ jsxs90("div", { className: "flex items-center justify-between gap-[var(--ui-kit-gap)] text-[10px] leading-4", children: [
|
|
21598
|
+
/* @__PURE__ */ jsx97("span", { className: "text-[var(--ui-kit-fg-muted)]", children: t("passport:bridgeMenu.labels.selectToken") }),
|
|
21599
|
+
/* @__PURE__ */ jsxs90("span", { className: "flex items-center gap-[var(--ui-kit-gap)]", children: [
|
|
21600
|
+
/* @__PURE__ */ jsxs90("span", { className: "text-[var(--ui-kit-fg-muted)]", children: [
|
|
21601
|
+
t("passport:common.balance"),
|
|
21602
|
+
": "
|
|
21603
|
+
] }),
|
|
21604
|
+
isRouteTokenBalanceLoading && /* @__PURE__ */ jsx97(LoaderIcon12, { className: "w-4 h-4 animate-spin text-[var(--ui-kit-fg-muted)]" }),
|
|
21605
|
+
!isRouteTokenBalanceLoading && /* @__PURE__ */ jsxs90("span", { className: cn("font-semibold", { "text-[var(--ui-kit-bg-error)]": isBalanceInsufficient }), children: [
|
|
21606
|
+
formatPrice(Number(routeTokenBalance || 0)),
|
|
21607
|
+
" ",
|
|
21608
|
+
selectedWarpRoute?.symbol
|
|
21609
|
+
] })
|
|
21610
|
+
] })
|
|
21219
21611
|
] }),
|
|
21220
|
-
|
|
21221
|
-
|
|
21612
|
+
/* @__PURE__ */ jsxs90(
|
|
21613
|
+
Button,
|
|
21222
21614
|
{
|
|
21223
|
-
|
|
21224
|
-
|
|
21225
|
-
className: "
|
|
21226
|
-
|
|
21227
|
-
|
|
21228
|
-
|
|
21229
|
-
|
|
21615
|
+
disabled: !hyperlaneWarpRoutes.length || isQuoteEstimating,
|
|
21616
|
+
variant: "secondary",
|
|
21617
|
+
className: "w-full justify-between",
|
|
21618
|
+
onClick: () => {
|
|
21619
|
+
useFlowSelectorStore.getState().setError(null);
|
|
21620
|
+
useBridgeStore.getState().setBridgeStep("select-token");
|
|
21621
|
+
},
|
|
21622
|
+
children: [
|
|
21623
|
+
selectedWarpRoute ? /* @__PURE__ */ jsxs90("div", { className: "flex items-center gap-[var(--ui-kit-gap)]", children: [
|
|
21624
|
+
/* @__PURE__ */ jsx97(SelectedWarpRoteIcon, { className: "w-6 h-6" }),
|
|
21625
|
+
/* @__PURE__ */ jsx97("span", { children: selectedWarpRoute.symbol })
|
|
21626
|
+
] }) : /* @__PURE__ */ jsxs90("div", { className: "flex items-center gap-[var(--ui-kit-gap)]", children: [
|
|
21627
|
+
/* @__PURE__ */ jsx97(ArrowLeftRightIcon, { className: "w-6 h-6" }),
|
|
21628
|
+
/* @__PURE__ */ jsx97("span", { children: hyperlaneWarpRoutes.length ? t("passport:bridgeMenu.labels.selectToken") : t("passport:bridgeMenu.errors.noWarpRoutes") })
|
|
21629
|
+
] }),
|
|
21630
|
+
!!selectedWarpRoute?.chainPair && /* @__PURE__ */ jsx97(
|
|
21631
|
+
Badge,
|
|
21632
|
+
{
|
|
21633
|
+
variant: "outline",
|
|
21634
|
+
size: "medium",
|
|
21635
|
+
className: "bg-[var(--ui-kit-bg)] flex items-center gap-[var(--ui-kit-gap)]",
|
|
21636
|
+
children: selectedWarpRoute.chainPair.map((chain, chIdx) => /* @__PURE__ */ jsxs90(Fragment36, { children: [
|
|
21637
|
+
chIdx > 0 && /* @__PURE__ */ jsx97(ArrowLeftRightIcon, { className: "w-4 h-4 " }),
|
|
21638
|
+
/* @__PURE__ */ jsx97(ResolveChainIcon, { chainName: chain.chainName, className: "w-4 h-4" })
|
|
21639
|
+
] }, `${selectedWarpRoute.id}-icon-${chain.chainID}-${chIdx}`))
|
|
21640
|
+
}
|
|
21641
|
+
)
|
|
21642
|
+
]
|
|
21230
21643
|
}
|
|
21231
21644
|
)
|
|
21232
21645
|
]
|
|
@@ -21235,82 +21648,87 @@ function SelectStep(props) {
|
|
|
21235
21648
|
/* @__PURE__ */ jsxs90(
|
|
21236
21649
|
"div",
|
|
21237
21650
|
{
|
|
21238
|
-
|
|
21239
|
-
|
|
21240
|
-
"text-[10px] text-[var(--ui-kit-fg-muted)] leading-4"
|
|
21241
|
-
),
|
|
21651
|
+
ref: (inst) => onboarder.registerElement("bridgemenu-crypto-menu-chain-pair-swapper" /* bridgeChainPairSwapper */, inst),
|
|
21652
|
+
className: "flex flex-col gap-[var(--ui-kit-gap)]",
|
|
21242
21653
|
children: [
|
|
21243
|
-
/* @__PURE__ */
|
|
21244
|
-
|
|
21654
|
+
/* @__PURE__ */ jsxs90(
|
|
21655
|
+
"div",
|
|
21656
|
+
{
|
|
21657
|
+
className: cn(
|
|
21658
|
+
"flex items-center justify-between gap-[var(--ui-kit-gap)]",
|
|
21659
|
+
"text-[10px] text-[var(--ui-kit-fg-muted)] leading-4"
|
|
21660
|
+
),
|
|
21661
|
+
children: [
|
|
21662
|
+
/* @__PURE__ */ jsx97("span", { className: "block text-[10px] text-[var(--ui-kit-fg-muted)]", children: t("passport:bridgeMenu.labels.fromChain") }),
|
|
21663
|
+
/* @__PURE__ */ jsx97("span", { className: "block text-[10px] text-[var(--ui-kit-fg-muted)]", children: t("passport:bridgeMenu.labels.toChain") })
|
|
21664
|
+
]
|
|
21665
|
+
}
|
|
21666
|
+
),
|
|
21667
|
+
/* @__PURE__ */ jsxs90("div", { className: "w-full flex items-center justify-center", children: [
|
|
21668
|
+
/* @__PURE__ */ jsx97(Badge, { variant: "outline", size: "large", className: "block flex-1 flex gap-[var(--ui-kit-gap)] justify-center", children: originChain ? /* @__PURE__ */ jsxs90(Fragment37, { children: [
|
|
21669
|
+
/* @__PURE__ */ jsx97(ResolveChainIcon, { chainName: originChain, className: "w-6 h-6" }),
|
|
21670
|
+
/* @__PURE__ */ jsx97("span", { className: "block max-w-[100px] truncate", children: CHAINS_UI_META[originChain]?.chainLabel })
|
|
21671
|
+
] }) : /* @__PURE__ */ jsx97("span", { className: "text-[var(--ui-kit-fg-muted)]", children: "N/A" }) }),
|
|
21672
|
+
/* @__PURE__ */ jsx97(
|
|
21673
|
+
Button,
|
|
21674
|
+
{
|
|
21675
|
+
size: "icon",
|
|
21676
|
+
disabled: !hyperlaneWarpRoutes.length || isQuoteEstimating,
|
|
21677
|
+
variant: "ghost",
|
|
21678
|
+
onClick: swapChains,
|
|
21679
|
+
children: /* @__PURE__ */ jsx97(ArrowRightLeftIcon, { className: "w-4 h-4 " })
|
|
21680
|
+
}
|
|
21681
|
+
),
|
|
21682
|
+
/* @__PURE__ */ jsx97(Badge, { variant: "outline", size: "large", className: "block flex-1 flex gap-[var(--ui-kit-gap)] justify-center", children: destinationChain ? /* @__PURE__ */ jsxs90(Fragment37, { children: [
|
|
21683
|
+
/* @__PURE__ */ jsx97(ResolveChainIcon, { chainName: destinationChain, className: "w-6 h-6" }),
|
|
21684
|
+
/* @__PURE__ */ jsx97("span", { className: "block max-w-[100px] truncate", children: CHAINS_UI_META[destinationChain]?.chainLabel })
|
|
21685
|
+
] }) : /* @__PURE__ */ jsx97("span", { className: "text-[var(--ui-kit-fg-muted)]", children: "N/A" }) })
|
|
21686
|
+
] })
|
|
21245
21687
|
]
|
|
21246
21688
|
}
|
|
21247
21689
|
),
|
|
21248
|
-
/* @__PURE__ */ jsxs90(
|
|
21249
|
-
|
|
21250
|
-
/* @__PURE__ */ jsx97(ResolveChainIcon, { chainName: originChain, className: "w-6 h-6" }),
|
|
21251
|
-
/* @__PURE__ */ jsx97("span", { className: "block max-w-[100px] truncate", children: CHAINS_UI_META[originChain]?.chainLabel })
|
|
21252
|
-
] }) : /* @__PURE__ */ jsx97("span", { className: "text-[var(--ui-kit-fg-muted)]", children: "N/A" }) }),
|
|
21253
|
-
/* @__PURE__ */ jsx97(
|
|
21254
|
-
Button,
|
|
21255
|
-
{
|
|
21256
|
-
size: "icon",
|
|
21257
|
-
disabled: !hyperlaneWarpRoutes.length || isQuoteEstimating,
|
|
21258
|
-
variant: "ghost",
|
|
21259
|
-
onClick: swapChains,
|
|
21260
|
-
children: /* @__PURE__ */ jsx97(ArrowRightLeftIcon, { className: "w-4 h-4 " })
|
|
21261
|
-
}
|
|
21262
|
-
),
|
|
21263
|
-
/* @__PURE__ */ jsx97(Badge, { variant: "outline", size: "large", className: "block flex-1 flex gap-[var(--ui-kit-gap)] justify-center", children: destinationChain ? /* @__PURE__ */ jsxs90(Fragment37, { children: [
|
|
21264
|
-
/* @__PURE__ */ jsx97(ResolveChainIcon, { chainName: destinationChain, className: "w-6 h-6" }),
|
|
21265
|
-
/* @__PURE__ */ jsx97("span", { className: "block max-w-[100px] truncate", children: CHAINS_UI_META[destinationChain]?.chainLabel })
|
|
21266
|
-
] }) : /* @__PURE__ */ jsx97("span", { className: "text-[var(--ui-kit-fg-muted)]", children: "N/A" }) })
|
|
21267
|
-
] }),
|
|
21268
|
-
/* @__PURE__ */ jsx97("span", { className: "text-[var(--ui-kit-fg-muted)] leading-4", children: t("passport:common.amount") }),
|
|
21269
|
-
/* @__PURE__ */ jsx97(
|
|
21270
|
-
Input,
|
|
21690
|
+
/* @__PURE__ */ jsxs90(
|
|
21691
|
+
"div",
|
|
21271
21692
|
{
|
|
21272
|
-
|
|
21273
|
-
|
|
21274
|
-
placeholder: t("passport:common.amount"),
|
|
21275
|
-
onChange: (e) => {
|
|
21276
|
-
useFlowSelectorStore.getState().setError(null);
|
|
21277
|
-
let { value } = e.target;
|
|
21278
|
-
const regex = /^(0|[1-9]\d*)(\.\d{0,5})?$/;
|
|
21279
|
-
if (value.length > 1 && value.startsWith("0") && !value.startsWith("0.")) {
|
|
21280
|
-
value = value.slice(1);
|
|
21281
|
-
}
|
|
21282
|
-
if (regex.test(value) || value === "") {
|
|
21283
|
-
if (value === "") {
|
|
21284
|
-
useBridgeStore.getState().setAmount("0");
|
|
21285
|
-
} else {
|
|
21286
|
-
useBridgeStore.getState().setAmount(value);
|
|
21287
|
-
}
|
|
21288
|
-
}
|
|
21289
|
-
},
|
|
21290
|
-
value: amount,
|
|
21291
|
-
element: /* @__PURE__ */ jsx97(
|
|
21292
|
-
Button,
|
|
21293
|
-
{
|
|
21294
|
-
size: "small",
|
|
21295
|
-
variant: "ghost",
|
|
21296
|
-
disabled: isBalanceInsufficient,
|
|
21297
|
-
onClick: () => useBridgeStore.getState().setAmount(Number(routeTokenBalance || 0).toString()),
|
|
21298
|
-
children: String(t("passport:common.max")).toUpperCase()
|
|
21299
|
-
}
|
|
21300
|
-
)
|
|
21301
|
-
}
|
|
21302
|
-
),
|
|
21303
|
-
/* @__PURE__ */ jsxs90(
|
|
21304
|
-
"div",
|
|
21305
|
-
{
|
|
21306
|
-
className: cn(
|
|
21307
|
-
//
|
|
21308
|
-
"w-full flex flex-col",
|
|
21309
|
-
"text-[10px]",
|
|
21310
|
-
"gap-[var(--ui-kit-gap)] pb-[var(--ui-kit-pd)]"
|
|
21311
|
-
),
|
|
21693
|
+
ref: (inst) => onboarder.registerElement("bridgemenu-crypto-menu-amount-recipient-inputs" /* bridgeAmountRecipientInputs */, inst),
|
|
21694
|
+
className: "flex flex-col gap-[var(--ui-kit-gap)]",
|
|
21312
21695
|
children: [
|
|
21313
|
-
/* @__PURE__ */ jsx97("span", { className: "text-[var(--ui-kit-fg-muted)] leading-4", children: t("passport:
|
|
21696
|
+
/* @__PURE__ */ jsx97("span", { className: "text-[var(--ui-kit-fg-muted)] text-[10px] leading-4", children: t("passport:common.amount") }),
|
|
21697
|
+
/* @__PURE__ */ jsx97(
|
|
21698
|
+
Input,
|
|
21699
|
+
{
|
|
21700
|
+
type: "text",
|
|
21701
|
+
disabled: isQuoteEstimating || !originChain || !destinationChain || !hyperRoute,
|
|
21702
|
+
placeholder: t("passport:common.amount"),
|
|
21703
|
+
onChange: (e) => {
|
|
21704
|
+
useFlowSelectorStore.getState().setError(null);
|
|
21705
|
+
let { value } = e.target;
|
|
21706
|
+
const regex = /^(0|[1-9]\d*)(\.\d{0,5})?$/;
|
|
21707
|
+
if (value.length > 1 && value.startsWith("0") && !value.startsWith("0.")) {
|
|
21708
|
+
value = value.slice(1);
|
|
21709
|
+
}
|
|
21710
|
+
if (regex.test(value) || value === "") {
|
|
21711
|
+
if (value === "") {
|
|
21712
|
+
useBridgeStore.getState().setAmount("0");
|
|
21713
|
+
} else {
|
|
21714
|
+
useBridgeStore.getState().setAmount(value);
|
|
21715
|
+
}
|
|
21716
|
+
}
|
|
21717
|
+
},
|
|
21718
|
+
value: amount,
|
|
21719
|
+
element: /* @__PURE__ */ jsx97(
|
|
21720
|
+
Button,
|
|
21721
|
+
{
|
|
21722
|
+
size: "small",
|
|
21723
|
+
variant: "ghost",
|
|
21724
|
+
disabled: isBalanceInsufficient,
|
|
21725
|
+
onClick: () => useBridgeStore.getState().setAmount(Number(routeTokenBalance || 0).toString()),
|
|
21726
|
+
children: String(t("passport:common.max")).toUpperCase()
|
|
21727
|
+
}
|
|
21728
|
+
)
|
|
21729
|
+
}
|
|
21730
|
+
),
|
|
21731
|
+
/* @__PURE__ */ jsx97("span", { className: "text-[var(--ui-kit-fg-muted)] text-[10px] leading-4", children: t("passport:bridgeMenu.labels.optionalRecipient") }),
|
|
21314
21732
|
/* @__PURE__ */ jsx97(
|
|
21315
21733
|
Input,
|
|
21316
21734
|
{
|
|
@@ -21345,6 +21763,7 @@ function SelectStep(props) {
|
|
|
21345
21763
|
!isError && /* @__PURE__ */ jsxs90(
|
|
21346
21764
|
Button,
|
|
21347
21765
|
{
|
|
21766
|
+
ref: (inst) => onboarder.registerElement("bridgemenu-crypto-menu-estimate-quote-button" /* bridgeEstimateQuoteButton */, inst),
|
|
21348
21767
|
size: "large",
|
|
21349
21768
|
variant: "default",
|
|
21350
21769
|
className: "w-full",
|
|
@@ -21364,6 +21783,7 @@ var init_SelectStep = __esm({
|
|
|
21364
21783
|
init_i18n();
|
|
21365
21784
|
init_priceFormatter();
|
|
21366
21785
|
init_utils2();
|
|
21786
|
+
init_Onboarding();
|
|
21367
21787
|
init_badge();
|
|
21368
21788
|
init_button();
|
|
21369
21789
|
init_input();
|
|
@@ -21428,97 +21848,104 @@ function ConfirmStep(props) {
|
|
|
21428
21848
|
return routeId === hyperRoute && chainPairNames.includes(originChain) && chainPairNames.includes(destinationChain);
|
|
21429
21849
|
});
|
|
21430
21850
|
const isConfirmationDisabled = !quote || isAssetBridging || !userConsent;
|
|
21431
|
-
return /* @__PURE__ */ jsxs91(
|
|
21432
|
-
|
|
21433
|
-
|
|
21434
|
-
|
|
21435
|
-
|
|
21436
|
-
|
|
21437
|
-
|
|
21438
|
-
|
|
21439
|
-
|
|
21440
|
-
|
|
21441
|
-
|
|
21442
|
-
|
|
21443
|
-
|
|
21444
|
-
|
|
21445
|
-
|
|
21446
|
-
|
|
21447
|
-
|
|
21448
|
-
|
|
21449
|
-
|
|
21450
|
-
|
|
21451
|
-
|
|
21452
|
-
|
|
21453
|
-
|
|
21454
|
-
|
|
21455
|
-
|
|
21456
|
-
|
|
21457
|
-
|
|
21458
|
-
|
|
21459
|
-
quote.
|
|
21460
|
-
|
|
21461
|
-
|
|
21462
|
-
|
|
21463
|
-
|
|
21464
|
-
|
|
21465
|
-
|
|
21466
|
-
|
|
21467
|
-
|
|
21468
|
-
|
|
21469
|
-
quote.
|
|
21851
|
+
return /* @__PURE__ */ jsxs91(
|
|
21852
|
+
"div",
|
|
21853
|
+
{
|
|
21854
|
+
ref: (inst) => onboarder.registerElement("bridgemenu-crypto-menu-estimate-details-menu" /* bridgeEstimatedQuoteMenu */, inst),
|
|
21855
|
+
className: "flex flex-col gap-[var(--ui-kit-gap)] w-full",
|
|
21856
|
+
children: [
|
|
21857
|
+
/* @__PURE__ */ jsxs91(Highlight, { type: "info", className: "flex flex-col gap-[var(--ui-kit-gap)] w-full", children: [
|
|
21858
|
+
/* @__PURE__ */ jsxs91("p", { className: P_CN, children: [
|
|
21859
|
+
/* @__PURE__ */ jsx99("span", { children: t("passport:common.asset") }),
|
|
21860
|
+
/* @__PURE__ */ jsx99("strong", { children: selectedWarpRoute.symbol })
|
|
21861
|
+
] }),
|
|
21862
|
+
/* @__PURE__ */ jsxs91("p", { className: P_CN, children: [
|
|
21863
|
+
/* @__PURE__ */ jsx99("span", { children: t("passport:bridgeMenu.quote.sender") }),
|
|
21864
|
+
/* @__PURE__ */ jsx99("strong", { children: bridgeSender.name + " (" + (bridgeSender?.address || "").slice(0, 6) + "..." + (bridgeSender?.address || "").slice(-4) + ")" })
|
|
21865
|
+
] }),
|
|
21866
|
+
/* @__PURE__ */ jsxs91("p", { className: P_CN, children: [
|
|
21867
|
+
/* @__PURE__ */ jsx99("span", { children: t("passport:bridgeMenu.labels.fromChain") }),
|
|
21868
|
+
/* @__PURE__ */ jsx99("strong", { children: CHAINS_UI_META[originChain].chainLabel })
|
|
21869
|
+
] }),
|
|
21870
|
+
/* @__PURE__ */ jsxs91("p", { className: P_CN, children: [
|
|
21871
|
+
/* @__PURE__ */ jsx99("span", { children: t("passport:bridgeMenu.labels.toChain") }),
|
|
21872
|
+
/* @__PURE__ */ jsx99("strong", { children: CHAINS_UI_META[destinationChain].chainLabel })
|
|
21873
|
+
] }),
|
|
21874
|
+
/* @__PURE__ */ jsxs91("p", { className: P_CN, children: [
|
|
21875
|
+
/* @__PURE__ */ jsx99("span", { children: t("passport:bridgeMenu.quote.amount") }),
|
|
21876
|
+
/* @__PURE__ */ jsx99("strong", { children: formatPrice(Number(quote.amount)) })
|
|
21877
|
+
] }),
|
|
21878
|
+
/* @__PURE__ */ jsxs91("p", { className: "flex-1 flex items-center justify-between gap-[var(--ui-kit-gap)]", children: [
|
|
21879
|
+
/* @__PURE__ */ jsx99("span", { children: t("passport:bridgeMenu.quote.igpFee") }),
|
|
21880
|
+
/* @__PURE__ */ jsxs91("strong", { children: [
|
|
21881
|
+
/* @__PURE__ */ jsx99("span", { children: formatPrice(Number(quote.igpFee)) }),
|
|
21882
|
+
/* @__PURE__ */ jsxs91("span", { children: [
|
|
21883
|
+
" ",
|
|
21884
|
+
quote.igpSymbol
|
|
21885
|
+
] })
|
|
21886
|
+
] })
|
|
21887
|
+
] }),
|
|
21888
|
+
/* @__PURE__ */ jsxs91("p", { className: "flex-1 flex items-center justify-between gap-[var(--ui-kit-gap)]", children: [
|
|
21889
|
+
/* @__PURE__ */ jsx99("span", { children: t("passport:bridgeMenu.quote.localFee") }),
|
|
21890
|
+
/* @__PURE__ */ jsxs91("strong", { children: [
|
|
21891
|
+
/* @__PURE__ */ jsx99("span", { children: formatPrice(Number(quote.localFee)) }),
|
|
21892
|
+
/* @__PURE__ */ jsxs91("span", { children: [
|
|
21893
|
+
" ",
|
|
21894
|
+
quote.localSymbol
|
|
21895
|
+
] })
|
|
21896
|
+
] })
|
|
21897
|
+
] }),
|
|
21898
|
+
quote.tokenFee && /* @__PURE__ */ jsxs91("p", { className: P_CN, children: [
|
|
21899
|
+
/* @__PURE__ */ jsx99("span", { children: t("passport:bridgeMenu.quote.tokenFee") }),
|
|
21900
|
+
/* @__PURE__ */ jsx99("strong", { children: formatPrice(Number(quote.tokenFee)) })
|
|
21470
21901
|
] })
|
|
21471
|
-
] })
|
|
21472
|
-
|
|
21473
|
-
|
|
21474
|
-
|
|
21475
|
-
|
|
21476
|
-
|
|
21477
|
-
|
|
21478
|
-
|
|
21479
|
-
|
|
21480
|
-
|
|
21481
|
-
|
|
21482
|
-
|
|
21483
|
-
|
|
21484
|
-
|
|
21485
|
-
"px-[var(--ui-kit-pd)]",
|
|
21486
|
-
"bg-[var(--ui-kit-bg)] text-[var(--ui-kit-fg)]",
|
|
21487
|
-
"rounded-[var(--ui-kit-el-bdrs)]"
|
|
21902
|
+
] }),
|
|
21903
|
+
/* @__PURE__ */ jsxs91(Highlight, { type: "warning", className: "flex flex-col gap-[var(--ui-kit-gap)] w-full", children: [
|
|
21904
|
+
/* @__PURE__ */ jsx99("strong", { className: "text-xs", children: t("passport:bridgeMenu.quote.recipient") }),
|
|
21905
|
+
/* @__PURE__ */ jsx99(
|
|
21906
|
+
"span",
|
|
21907
|
+
{
|
|
21908
|
+
className: cn(
|
|
21909
|
+
"w-full flex items-center justify-center h-8",
|
|
21910
|
+
"px-[var(--ui-kit-pd)]",
|
|
21911
|
+
"bg-[var(--ui-kit-bg)] text-[var(--ui-kit-fg)]",
|
|
21912
|
+
"rounded-[var(--ui-kit-el-bdrs)]"
|
|
21913
|
+
),
|
|
21914
|
+
children: (recipient || address).slice(0, 10) + "..." + (recipient || address).slice(-8)
|
|
21915
|
+
}
|
|
21488
21916
|
),
|
|
21489
|
-
|
|
21490
|
-
|
|
21491
|
-
|
|
21492
|
-
|
|
21493
|
-
|
|
21494
|
-
|
|
21495
|
-
|
|
21496
|
-
|
|
21497
|
-
|
|
21498
|
-
|
|
21499
|
-
|
|
21500
|
-
|
|
21501
|
-
|
|
21502
|
-
|
|
21503
|
-
|
|
21504
|
-
|
|
21505
|
-
|
|
21506
|
-
|
|
21507
|
-
|
|
21508
|
-
|
|
21509
|
-
|
|
21510
|
-
|
|
21511
|
-
|
|
21512
|
-
|
|
21513
|
-
|
|
21514
|
-
|
|
21515
|
-
|
|
21516
|
-
|
|
21517
|
-
|
|
21518
|
-
|
|
21519
|
-
|
|
21520
|
-
|
|
21521
|
-
] });
|
|
21917
|
+
/* @__PURE__ */ jsx99("strong", { className: "text-xs", children: t("passport:bridgeMenu.consent.recipient", {
|
|
21918
|
+
address: (recipient || address).slice(0, 6) + "..." + (recipient || address).slice(-4),
|
|
21919
|
+
destinationChain: CHAINS_UI_META[destinationChain].chainLabel,
|
|
21920
|
+
asset: selectedWarpRoute.symbol
|
|
21921
|
+
}) }),
|
|
21922
|
+
/* @__PURE__ */ jsx99("strong", { className: "text-xs text-[var(--ui-kit-bg-error)]", children: t("passport:bridgeMenu.consent.lostFunds") }),
|
|
21923
|
+
/* @__PURE__ */ jsxs91("label", { className: "flex items-center gap-[var(--ui-kit-gap)] text-xs cursor-pointer", children: [
|
|
21924
|
+
/* @__PURE__ */ jsx99(Checkbox, { checked: userConsent, onCheckedChange: () => setUserConsent((prev) => !prev) }),
|
|
21925
|
+
/* @__PURE__ */ jsx99("strong", { children: t("passport:bridgeMenu.actions.confirmBridge", {
|
|
21926
|
+
amount: quote.amount,
|
|
21927
|
+
asset: selectedWarpRoute.symbol,
|
|
21928
|
+
destinationChain: CHAINS_UI_META[destinationChain].chainLabel
|
|
21929
|
+
}) })
|
|
21930
|
+
] })
|
|
21931
|
+
] }),
|
|
21932
|
+
!isError && /* @__PURE__ */ jsxs91(
|
|
21933
|
+
Button,
|
|
21934
|
+
{
|
|
21935
|
+
size: "large",
|
|
21936
|
+
variant: "default",
|
|
21937
|
+
disabled: isConfirmationDisabled,
|
|
21938
|
+
onClick: () => bridgeAsset(),
|
|
21939
|
+
className: "w-full",
|
|
21940
|
+
children: [
|
|
21941
|
+
isAssetBridging && /* @__PURE__ */ jsx99(LoaderIcon13, { className: "h-4 w-4 animate-spin" }),
|
|
21942
|
+
/* @__PURE__ */ jsx99("span", { children: (bridgeTxStatus || t("passport:common.continue")).toUpperCase() })
|
|
21943
|
+
]
|
|
21944
|
+
}
|
|
21945
|
+
)
|
|
21946
|
+
]
|
|
21947
|
+
}
|
|
21948
|
+
);
|
|
21522
21949
|
}
|
|
21523
21950
|
var P_CN;
|
|
21524
21951
|
var init_ConfirmStep = __esm({
|
|
@@ -21527,6 +21954,7 @@ var init_ConfirmStep = __esm({
|
|
|
21527
21954
|
init_i18n();
|
|
21528
21955
|
init_priceFormatter();
|
|
21529
21956
|
init_utils2();
|
|
21957
|
+
init_Onboarding();
|
|
21530
21958
|
init_button();
|
|
21531
21959
|
init_checkbox();
|
|
21532
21960
|
init_highlight();
|
|
@@ -21630,7 +22058,7 @@ var init_SuccessStep = __esm({
|
|
|
21630
22058
|
// src/internal/components/SendMenu/hyperbridge/steps/HistoryStep.tsx
|
|
21631
22059
|
import { useQueryClient as useQueryClient24 } from "@tanstack/react-query";
|
|
21632
22060
|
import dayjs7 from "dayjs";
|
|
21633
|
-
import { ArrowRightIcon, DownloadIcon as DownloadIcon2, ExternalLinkIcon as ExternalLinkIcon3, InfoIcon as
|
|
22061
|
+
import { ArrowRightIcon, DownloadIcon as DownloadIcon2, ExternalLinkIcon as ExternalLinkIcon3, InfoIcon as InfoIcon5, LoaderIcon as LoaderIcon14 } from "lucide-react";
|
|
21634
22062
|
import { jsx as jsx101, jsxs as jsxs93 } from "react/jsx-runtime";
|
|
21635
22063
|
function HistoryDetailsStep() {
|
|
21636
22064
|
const { t } = useT();
|
|
@@ -21837,7 +22265,7 @@ function HistoryItem(props) {
|
|
|
21837
22265
|
setBridgeStep("tx-history-details");
|
|
21838
22266
|
},
|
|
21839
22267
|
children: [
|
|
21840
|
-
/* @__PURE__ */ jsx101(
|
|
22268
|
+
/* @__PURE__ */ jsx101(InfoIcon5, { className: "w-4 h-4" }),
|
|
21841
22269
|
/* @__PURE__ */ jsx101("span", { className: "text-xs leading-5", children: t("passport:common.details") })
|
|
21842
22270
|
]
|
|
21843
22271
|
}
|
|
@@ -21896,12 +22324,11 @@ var init_HistoryStep = __esm({
|
|
|
21896
22324
|
|
|
21897
22325
|
// src/internal/components/SendMenu/hyperbridge/steps/SelectAssetRoute.tsx
|
|
21898
22326
|
import { ArrowLeftRightIcon as ArrowLeftRightIcon2 } from "lucide-react";
|
|
21899
|
-
import { useMemo as useMemo13
|
|
21900
|
-
import {
|
|
22327
|
+
import { useMemo as useMemo13 } from "react";
|
|
22328
|
+
import { jsx as jsx102, jsxs as jsxs94 } from "react/jsx-runtime";
|
|
21901
22329
|
function SelectAssetRoute(props) {
|
|
21902
22330
|
const { hyperlaneWarpRoutes } = props;
|
|
21903
22331
|
const { t } = useT();
|
|
21904
|
-
const [isTokenSymbolSelector, setIsTokenSymbolSelector] = useState24(false);
|
|
21905
22332
|
const selectedAssetSymbol = useBridgeStore((st) => st.bridgeAssetSymbol);
|
|
21906
22333
|
const tokenList = useMemo13(() => {
|
|
21907
22334
|
const tokens = hyperlaneWarpRoutes.map((route) => route.symbol);
|
|
@@ -21911,47 +22338,30 @@ function SelectAssetRoute(props) {
|
|
|
21911
22338
|
Icon: TOKENS_ICONS[symbol.toUpperCase()] || TOKENS_ICONS.EMBARKAI
|
|
21912
22339
|
}));
|
|
21913
22340
|
}, [hyperlaneWarpRoutes]);
|
|
21914
|
-
if (isTokenSymbolSelector) {
|
|
21915
|
-
return /* @__PURE__ */ jsx102("div", { className: "w-full grid grid-cols-1 gap-[var(--ui-kit-gap)]", children: tokenList.map((asset, assetIdx) => /* @__PURE__ */ jsxs94(
|
|
21916
|
-
Button,
|
|
21917
|
-
{
|
|
21918
|
-
variant: selectedAssetSymbol === asset.symbol ? "default" : "outline",
|
|
21919
|
-
className: "w-full justify-start",
|
|
21920
|
-
onClick: () => {
|
|
21921
|
-
useBridgeStore.getState().setBridgeAssetSymbol(asset.symbol);
|
|
21922
|
-
setIsTokenSymbolSelector(false);
|
|
21923
|
-
useFlowSelectorStore.getState().setRenderKey(`hyperlane-route-token-${asset.symbol}-${Date.now()}`);
|
|
21924
|
-
},
|
|
21925
|
-
children: [
|
|
21926
|
-
/* @__PURE__ */ jsx102(asset.Icon, { className: "w-6 h-6" }),
|
|
21927
|
-
asset.symbol
|
|
21928
|
-
]
|
|
21929
|
-
},
|
|
21930
|
-
`hyperlane-route-token-${asset.symbol}-${assetIdx}`
|
|
21931
|
-
)) });
|
|
21932
|
-
}
|
|
21933
|
-
const selectedAsset = tokenList.find((t2) => t2.symbol === selectedAssetSymbol);
|
|
21934
22341
|
const availableChainPairs = hyperlaneWarpRoutes.filter((route) => route.symbol.toUpperCase() === selectedAssetSymbol).map((route) => route.chainPair);
|
|
21935
22342
|
return /* @__PURE__ */ jsxs94("div", { className: "w-full flex flex-col gap-[var(--ui-kit-gap)]", children: [
|
|
21936
|
-
/* @__PURE__ */
|
|
21937
|
-
|
|
21938
|
-
|
|
21939
|
-
|
|
21940
|
-
|
|
21941
|
-
|
|
21942
|
-
|
|
21943
|
-
|
|
21944
|
-
|
|
22343
|
+
/* @__PURE__ */ jsxs94("div", { className: "w-full flex flex-col gap-[var(--ui-kit-gap)]", children: [
|
|
22344
|
+
/* @__PURE__ */ jsx102("span", { className: "block text-[10px] text-[var(--ui-kit-fg-muted)]", children: t("passport:bridgeMenu.labels.selectToken") }),
|
|
22345
|
+
/* @__PURE__ */ jsx102("div", { className: "w-full grid grid-cols-2 gap-[var(--ui-kit-gap)]", children: tokenList.map((asset, assetIdx) => /* @__PURE__ */ jsxs94(
|
|
22346
|
+
Button,
|
|
22347
|
+
{
|
|
22348
|
+
variant: selectedAssetSymbol === asset.symbol ? "default" : "outline",
|
|
22349
|
+
className: "w-full justify-start",
|
|
22350
|
+
onClick: () => {
|
|
22351
|
+
useBridgeStore.getState().setBridgeAssetSymbol(asset.symbol);
|
|
22352
|
+
useFlowSelectorStore.getState().setRenderKey(`hyperlane-route-token-${asset.symbol}-${Date.now()}`);
|
|
22353
|
+
},
|
|
22354
|
+
children: [
|
|
22355
|
+
/* @__PURE__ */ jsx102(asset.Icon, { className: "w-6 h-6" }),
|
|
22356
|
+
asset.symbol
|
|
22357
|
+
]
|
|
21945
22358
|
},
|
|
21946
|
-
|
|
21947
|
-
|
|
21948
|
-
|
|
21949
|
-
|
|
21950
|
-
}
|
|
21951
|
-
),
|
|
21952
|
-
availableChainPairs.length > 0 && /* @__PURE__ */ jsxs94(Fragment38, { children: [
|
|
22359
|
+
`hyperlane-route-token-${asset.symbol}-${assetIdx}`
|
|
22360
|
+
)) })
|
|
22361
|
+
] }),
|
|
22362
|
+
availableChainPairs.length > 0 && /* @__PURE__ */ jsxs94("div", { className: "w-full flex flex-col gap-[var(--ui-kit-gap)]", children: [
|
|
21953
22363
|
/* @__PURE__ */ jsx102("span", { className: "block text-[10px] text-[var(--ui-kit-fg-muted)]", children: t("passport:bridgeMenu.labels.availableChainPairs") }),
|
|
21954
|
-
|
|
22364
|
+
availableChainPairs.map(([fromChain, toChain]) => /* @__PURE__ */ jsxs94(
|
|
21955
22365
|
Button,
|
|
21956
22366
|
{
|
|
21957
22367
|
variant: "secondary",
|
|
@@ -21996,7 +22406,7 @@ function SelectAssetRoute(props) {
|
|
|
21996
22406
|
]
|
|
21997
22407
|
},
|
|
21998
22408
|
`hyperlane-route-chain-pair-${fromChain.chainName}-${toChain.chainName}`
|
|
21999
|
-
))
|
|
22409
|
+
))
|
|
22000
22410
|
] })
|
|
22001
22411
|
] });
|
|
22002
22412
|
}
|
|
@@ -22025,7 +22435,7 @@ var init_steps = __esm({
|
|
|
22025
22435
|
|
|
22026
22436
|
// src/internal/components/SendMenu/hyperbridge/HyperlaneBridge.tsx
|
|
22027
22437
|
import { useEffect as useEffect43 } from "react";
|
|
22028
|
-
import {
|
|
22438
|
+
import { jsx as jsx103, jsxs as jsxs95 } from "react/jsx-runtime";
|
|
22029
22439
|
function HyperlaneBridge() {
|
|
22030
22440
|
const bridgeStep = useBridgeStore((st) => st.bridgeStep);
|
|
22031
22441
|
const { swapDirection, handleQuoteEstimation, bridgeAsset, isAssetBridging } = useBridge();
|
|
@@ -22037,7 +22447,7 @@ function HyperlaneBridge() {
|
|
|
22037
22447
|
useBridgeStore.getState().resetSelections();
|
|
22038
22448
|
};
|
|
22039
22449
|
}, []);
|
|
22040
|
-
return /* @__PURE__ */ jsxs95(
|
|
22450
|
+
return /* @__PURE__ */ jsxs95("div", { className: "w-full flex flex-col gap-[var(--ui-kit-gap)]", children: [
|
|
22041
22451
|
bridgeStep === "sender-selector" && /* @__PURE__ */ jsx103(SenderSelector, { directWalletProfile }),
|
|
22042
22452
|
bridgeStep === "select" && /* @__PURE__ */ jsx103(
|
|
22043
22453
|
SelectStep,
|
|
@@ -22187,7 +22597,7 @@ var init_useErc3643Compliance = __esm({
|
|
|
22187
22597
|
|
|
22188
22598
|
// src/hooks/useNicknameResolve.ts
|
|
22189
22599
|
import { useQuery as useQuery22 } from "@tanstack/react-query";
|
|
22190
|
-
import { useEffect as useEffect44, useMemo as useMemo14, useState as
|
|
22600
|
+
import { useEffect as useEffect44, useMemo as useMemo14, useState as useState24 } from "react";
|
|
22191
22601
|
function looksLikeNickname(input) {
|
|
22192
22602
|
if (!input) return false;
|
|
22193
22603
|
if (input.startsWith("0x")) return false;
|
|
@@ -22197,8 +22607,8 @@ function looksLikeNickname(input) {
|
|
|
22197
22607
|
}
|
|
22198
22608
|
function useNicknameResolve(input, options) {
|
|
22199
22609
|
const { enabled = true, chainId } = options;
|
|
22200
|
-
const [debouncedInput, setDebouncedInput] =
|
|
22201
|
-
const [isDebouncing, setIsDebouncing] =
|
|
22610
|
+
const [debouncedInput, setDebouncedInput] = useState24("");
|
|
22611
|
+
const [isDebouncing, setIsDebouncing] = useState24(false);
|
|
22202
22612
|
const normalized = normalizeNickname(input);
|
|
22203
22613
|
const isNicknameInput = looksLikeNickname(input) && normalized.length >= 3;
|
|
22204
22614
|
useEffect44(() => {
|
|
@@ -22261,14 +22671,14 @@ var init_useNicknameResolve = __esm({
|
|
|
22261
22671
|
});
|
|
22262
22672
|
|
|
22263
22673
|
// src/hooks/useSendTransaction.ts
|
|
22264
|
-
import { useCallback as useCallback29, useState as
|
|
22674
|
+
import { useCallback as useCallback29, useState as useState25 } from "react";
|
|
22265
22675
|
import { encodeFunctionData as encodeFunctionData2, isAddress, parseEther as parseEther2, parseUnits } from "viem";
|
|
22266
22676
|
function useSendTransaction() {
|
|
22267
22677
|
const session = useSession((st) => st.session);
|
|
22268
22678
|
const address = useSession((st) => st.address);
|
|
22269
|
-
const [isLoading, setIsLoading] =
|
|
22270
|
-
const [error, setError] =
|
|
22271
|
-
const [userOpHash, setUserOpHash] =
|
|
22679
|
+
const [isLoading, setIsLoading] = useState25(false);
|
|
22680
|
+
const [error, setError] = useState25(null);
|
|
22681
|
+
const [userOpHash, setUserOpHash] = useState25(null);
|
|
22272
22682
|
const sendTransaction = useCallback29(
|
|
22273
22683
|
async (params) => {
|
|
22274
22684
|
if (!session || !address) {
|
|
@@ -22521,10 +22931,10 @@ var init_AssetInputIcon = __esm({
|
|
|
22521
22931
|
|
|
22522
22932
|
// src/internal/components/SendMenu/send/components/NftDisplayCard.tsx
|
|
22523
22933
|
import { Image as ImageIcon2, Sparkles as Sparkles2 } from "lucide-react";
|
|
22524
|
-
import { useState as
|
|
22934
|
+
import { useState as useState26 } from "react";
|
|
22525
22935
|
import { jsx as jsx106, jsxs as jsxs97 } from "react/jsx-runtime";
|
|
22526
22936
|
function NftDisplayCard({ asset }) {
|
|
22527
|
-
const [imageError, setImageError] =
|
|
22937
|
+
const [imageError, setImageError] = useState26(false);
|
|
22528
22938
|
const nftImage = asset.image || asset.nftMetadata?.image;
|
|
22529
22939
|
return /* @__PURE__ */ jsxs97("div", { className: "flex items-center gap-3 p-3 rounded-[var(--ui-kit-el-bdrs)] bg-[var(--ui-kit-bg-secondary)]", children: [
|
|
22530
22940
|
nftImage && !imageError ? /* @__PURE__ */ jsx106(
|
|
@@ -22557,48 +22967,9 @@ var init_NftDisplayCard = __esm({
|
|
|
22557
22967
|
}
|
|
22558
22968
|
});
|
|
22559
22969
|
|
|
22560
|
-
// src/internal/components/SendMenu/send/useSendStore.ts
|
|
22561
|
-
import { create as create15 } from "zustand";
|
|
22562
|
-
var useSendStore;
|
|
22563
|
-
var init_useSendStore = __esm({
|
|
22564
|
-
"src/internal/components/SendMenu/send/useSendStore.ts"() {
|
|
22565
|
-
init_useFlowSelector();
|
|
22566
|
-
useSendStore = create15((set) => ({
|
|
22567
|
-
recipient: "",
|
|
22568
|
-
//
|
|
22569
|
-
amount: "",
|
|
22570
|
-
selectedAsset: null,
|
|
22571
|
-
//
|
|
22572
|
-
txStep: "input",
|
|
22573
|
-
//
|
|
22574
|
-
// sendError: null,
|
|
22575
|
-
//
|
|
22576
|
-
setRecipient: (recipient) => {
|
|
22577
|
-
useFlowSelectorStore.getState().setError(null);
|
|
22578
|
-
set({ recipient });
|
|
22579
|
-
},
|
|
22580
|
-
//
|
|
22581
|
-
setAmount: (amount) => {
|
|
22582
|
-
useFlowSelectorStore.getState().setError(null);
|
|
22583
|
-
set({ amount });
|
|
22584
|
-
},
|
|
22585
|
-
setSelectedAsset: (selectedAsset) => {
|
|
22586
|
-
useFlowSelectorStore.getState().setError(null);
|
|
22587
|
-
set({ selectedAsset });
|
|
22588
|
-
},
|
|
22589
|
-
//
|
|
22590
|
-
setTxStep: (txStep) => {
|
|
22591
|
-
useFlowSelectorStore.getState().setError(null);
|
|
22592
|
-
useFlowSelectorStore.getState().setRenderKey(`send-${txStep}-${Date.now()}`);
|
|
22593
|
-
set({ txStep });
|
|
22594
|
-
}
|
|
22595
|
-
}));
|
|
22596
|
-
}
|
|
22597
|
-
});
|
|
22598
|
-
|
|
22599
22970
|
// src/internal/components/SendMenu/send/components/AssetList.tsx
|
|
22600
22971
|
import { formatUnits as formatUnits10 } from "viem";
|
|
22601
|
-
import { Fragment as
|
|
22972
|
+
import { Fragment as Fragment38, jsx as jsx107, jsxs as jsxs98 } from "react/jsx-runtime";
|
|
22602
22973
|
function getAssetBalance3(asset) {
|
|
22603
22974
|
if (isNftAsset3(asset)) return "1";
|
|
22604
22975
|
const balance = Number(formatUnits10(BigInt(asset?.balance || "0"), asset?.decimals || 18));
|
|
@@ -22635,13 +23006,13 @@ function AssetListItem(props) {
|
|
|
22635
23006
|
" \xB7 ",
|
|
22636
23007
|
truncateMiddle(asset.address, 6, 4)
|
|
22637
23008
|
] }),
|
|
22638
|
-
/* @__PURE__ */ jsx107("span", { className: "block text-lg font-bold", children: isNft ? /* @__PURE__ */ jsxs98(
|
|
23009
|
+
/* @__PURE__ */ jsx107("span", { className: "block text-lg font-bold", children: isNft ? /* @__PURE__ */ jsxs98(Fragment38, { children: [
|
|
22639
23010
|
asset.symbol,
|
|
22640
23011
|
asset.tokenId && /* @__PURE__ */ jsxs98("span", { className: "ml-1", children: [
|
|
22641
23012
|
"#",
|
|
22642
23013
|
asset.tokenId.length > 6 ? `${asset.tokenId.slice(0, 4)}...` : asset.tokenId
|
|
22643
23014
|
] })
|
|
22644
|
-
] }) : /* @__PURE__ */ jsxs98(
|
|
23015
|
+
] }) : /* @__PURE__ */ jsxs98(Fragment38, { children: [
|
|
22645
23016
|
BALANCE_PREFIXES[asset.symbol] || null,
|
|
22646
23017
|
/* @__PURE__ */ jsx107("span", { children: getAssetBalance3(asset) }),
|
|
22647
23018
|
" ",
|
|
@@ -22666,20 +23037,20 @@ function AssetList(props) {
|
|
|
22666
23037
|
const tokenAssets = transferableAssets.filter((a) => a.type === "erc20");
|
|
22667
23038
|
const securityAssets = transferableAssets.filter((a) => a.type === "erc3643");
|
|
22668
23039
|
const nftAssets = transferableAssets.filter((a) => a.type === "erc721" || a.type === "erc1155");
|
|
22669
|
-
return /* @__PURE__ */ jsxs98(
|
|
22670
|
-
nativeAssets.length > 0 && /* @__PURE__ */ jsxs98(
|
|
23040
|
+
return /* @__PURE__ */ jsxs98(Fragment38, { children: [
|
|
23041
|
+
nativeAssets.length > 0 && /* @__PURE__ */ jsxs98(Fragment38, { children: [
|
|
22671
23042
|
/* @__PURE__ */ jsx107("div", { className: "text-[10px] text-[var(--ui-kit-fg-muted)] uppercase", children: "Crypto" }),
|
|
22672
23043
|
nativeAssets.map((asset) => /* @__PURE__ */ jsx107(AssetListItem, { asset }, `native-${asset.symbol}`))
|
|
22673
23044
|
] }),
|
|
22674
|
-
tokenAssets.length > 0 && /* @__PURE__ */ jsxs98(
|
|
23045
|
+
tokenAssets.length > 0 && /* @__PURE__ */ jsxs98(Fragment38, { children: [
|
|
22675
23046
|
/* @__PURE__ */ jsx107("div", { className: "text-[10px] text-[var(--ui-kit-fg-muted)] uppercase", children: "Tokens" }),
|
|
22676
23047
|
tokenAssets.map((asset) => /* @__PURE__ */ jsx107(AssetListItem, { asset }, `token-${asset.address}`))
|
|
22677
23048
|
] }),
|
|
22678
|
-
securityAssets.length > 0 && /* @__PURE__ */ jsxs98(
|
|
23049
|
+
securityAssets.length > 0 && /* @__PURE__ */ jsxs98(Fragment38, { children: [
|
|
22679
23050
|
/* @__PURE__ */ jsx107("div", { className: "text-[10px] text-[var(--ui-kit-fg-muted)] uppercase", children: "Security Tokens" }),
|
|
22680
23051
|
securityAssets.map((asset) => /* @__PURE__ */ jsx107(AssetListItem, { asset }, `security-${asset.address}`))
|
|
22681
23052
|
] }),
|
|
22682
|
-
nftAssets.length > 0 && /* @__PURE__ */ jsxs98(
|
|
23053
|
+
nftAssets.length > 0 && /* @__PURE__ */ jsxs98(Fragment38, { children: [
|
|
22683
23054
|
/* @__PURE__ */ jsx107("div", { className: "text-[10px] text-[var(--ui-kit-fg-muted)] uppercase", children: "NFTs" }),
|
|
22684
23055
|
nftAssets.map((asset) => /* @__PURE__ */ jsx107(AssetListItem, { asset }, `nft-${asset.address}-${asset.tokenId}`))
|
|
22685
23056
|
] }),
|
|
@@ -22880,7 +23251,7 @@ var init_useTokenBalance = __esm({
|
|
|
22880
23251
|
// src/internal/components/SendMenu/send/sendSteps/InputSendStep.tsx
|
|
22881
23252
|
import { AlertCircle as AlertCircle4, AtSign as AtSign2, CheckCircle2 as CheckCircle25, Loader as Loader20, Wallet2 as Wallet24 } from "lucide-react";
|
|
22882
23253
|
import { formatUnits as formatUnits12, isAddress as isAddress2 } from "viem";
|
|
22883
|
-
import { Fragment as
|
|
23254
|
+
import { Fragment as Fragment39, jsx as jsx109, jsxs as jsxs100 } from "react/jsx-runtime";
|
|
22884
23255
|
function InputSendStep(props) {
|
|
22885
23256
|
const { erc3643Compliance, isNicknameInput, resolvedNicknameData, isAssetsLoading } = props;
|
|
22886
23257
|
const address = useSession((st) => st.address);
|
|
@@ -22979,7 +23350,7 @@ function InputSendStep(props) {
|
|
|
22979
23350
|
setError(null);
|
|
22980
23351
|
return true;
|
|
22981
23352
|
};
|
|
22982
|
-
return /* @__PURE__ */ jsxs100(
|
|
23353
|
+
return /* @__PURE__ */ jsxs100("div", { className: "flex flex-col gap-[var(--ui-kit-gap)]", children: [
|
|
22983
23354
|
/* @__PURE__ */ jsx109("span", { className: "block text-[10px] text-[var(--ui-kit-fg-muted)]", children: t("passport:sendMenu.selectAsset") }),
|
|
22984
23355
|
/* @__PURE__ */ jsxs100(
|
|
22985
23356
|
Button,
|
|
@@ -23043,13 +23414,13 @@ function InputSendStep(props) {
|
|
|
23043
23414
|
{
|
|
23044
23415
|
type: isComplianceLoading ? "info" : erc3643CanTransfer ? "success" : "error",
|
|
23045
23416
|
className: "flex gap-[var(--ui-kit-gap)]",
|
|
23046
|
-
children: isComplianceLoading ? /* @__PURE__ */ jsxs100(
|
|
23417
|
+
children: isComplianceLoading ? /* @__PURE__ */ jsxs100(Fragment39, { children: [
|
|
23047
23418
|
/* @__PURE__ */ jsx109(Loader20, { className: "h-4 w-4 animate-spin" }),
|
|
23048
23419
|
/* @__PURE__ */ jsx109("span", { children: "Checking compliance..." })
|
|
23049
|
-
] }) : erc3643CanTransfer ? /* @__PURE__ */ jsxs100(
|
|
23420
|
+
] }) : erc3643CanTransfer ? /* @__PURE__ */ jsxs100(Fragment39, { children: [
|
|
23050
23421
|
/* @__PURE__ */ jsx109(CheckCircle25, { className: "h-4 w-4" }),
|
|
23051
23422
|
/* @__PURE__ */ jsx109("span", { children: "Transfer compliant" })
|
|
23052
|
-
] }) : /* @__PURE__ */ jsxs100(
|
|
23423
|
+
] }) : /* @__PURE__ */ jsxs100(Fragment39, { children: [
|
|
23053
23424
|
/* @__PURE__ */ jsx109(AlertCircle4, { className: "h-4 w-4" }),
|
|
23054
23425
|
/* @__PURE__ */ jsx109("span", { children: complianceError || "Transfer not allowed" })
|
|
23055
23426
|
] })
|
|
@@ -23089,7 +23460,7 @@ var init_InputSendStep = __esm({
|
|
|
23089
23460
|
// src/internal/components/SendMenu/send/sendSteps/ConfirmSendStep.tsx
|
|
23090
23461
|
import { useMutation as useMutation21 } from "@tanstack/react-query";
|
|
23091
23462
|
import { AlertTriangle as AlertTriangle5, AtSign as AtSign3, Loader as Loader21, Shield as Shield2, ShieldAlert as ShieldAlert2, ShieldCheck as ShieldCheck3 } from "lucide-react";
|
|
23092
|
-
import { Fragment as
|
|
23463
|
+
import { Fragment as Fragment40, jsx as jsx110, jsxs as jsxs101 } from "react/jsx-runtime";
|
|
23093
23464
|
function ConfirmSendStep(props) {
|
|
23094
23465
|
const { sendTransaction, erc3643Compliance, isNicknameInput, resolvedNicknameData } = props;
|
|
23095
23466
|
const { t } = useT();
|
|
@@ -23126,134 +23497,141 @@ function ConfirmSendStep(props) {
|
|
|
23126
23497
|
useFlowSelectorStore.getState().setError(error?.message || "Transaction failed");
|
|
23127
23498
|
}
|
|
23128
23499
|
});
|
|
23129
|
-
return /* @__PURE__ */ jsxs101(
|
|
23130
|
-
|
|
23131
|
-
|
|
23132
|
-
|
|
23133
|
-
|
|
23134
|
-
|
|
23135
|
-
|
|
23136
|
-
|
|
23137
|
-
|
|
23138
|
-
|
|
23139
|
-
|
|
23140
|
-
|
|
23141
|
-
|
|
23142
|
-
|
|
23143
|
-
|
|
23144
|
-
|
|
23145
|
-
|
|
23146
|
-
|
|
23147
|
-
|
|
23148
|
-
|
|
23149
|
-
|
|
23150
|
-
|
|
23151
|
-
|
|
23152
|
-
|
|
23153
|
-
|
|
23154
|
-
|
|
23155
|
-
|
|
23156
|
-
|
|
23157
|
-
|
|
23158
|
-
|
|
23159
|
-
|
|
23160
|
-
|
|
23161
|
-
|
|
23162
|
-
|
|
23163
|
-
{
|
|
23164
|
-
|
|
23165
|
-
|
|
23166
|
-
|
|
23500
|
+
return /* @__PURE__ */ jsxs101(
|
|
23501
|
+
"div",
|
|
23502
|
+
{
|
|
23503
|
+
ref: (inst) => onboarder.registerElement("sendmenu-crypto-summary" /* sendCryptoSummary */, inst),
|
|
23504
|
+
className: "flex flex-col gap-[var(--ui-kit-gap)]",
|
|
23505
|
+
children: [
|
|
23506
|
+
isNicknameInput && isFrozen && /* @__PURE__ */ jsxs101(Highlight, { type: "warning", className: "flex gap-[var(--ui-kit-gap)]", children: [
|
|
23507
|
+
/* @__PURE__ */ jsx110(AlertTriangle5, { className: "h-4 w-4" }),
|
|
23508
|
+
/* @__PURE__ */ jsx110("span", { children: "This handle is frozen. Proceed with caution." })
|
|
23509
|
+
] }),
|
|
23510
|
+
isSecurity && erc3643CanTransfer && /* @__PURE__ */ jsxs101(Highlight, { type: "success", className: "flex gap-[var(--ui-kit-gap)]", children: [
|
|
23511
|
+
/* @__PURE__ */ jsx110(Shield2, { className: "h-4 w-4 flex-shrink-0" }),
|
|
23512
|
+
/* @__PURE__ */ jsx110("span", { children: "Security token compliance verified" })
|
|
23513
|
+
] }),
|
|
23514
|
+
!isNft && /* @__PURE__ */ jsxs101("div", { className: "flex justify-between leading-5", children: [
|
|
23515
|
+
/* @__PURE__ */ jsxs101("span", { className: "text-[10px] text-[var(--ui-kit-fg-muted)]", children: [
|
|
23516
|
+
selectedAsset.symbol,
|
|
23517
|
+
" Balance"
|
|
23518
|
+
] }),
|
|
23519
|
+
/* @__PURE__ */ jsxs101("span", { className: "text-sm font-bold", children: [
|
|
23520
|
+
formatPrice(balance),
|
|
23521
|
+
" ",
|
|
23522
|
+
selectedAsset.symbol
|
|
23523
|
+
] })
|
|
23524
|
+
] }),
|
|
23525
|
+
/* @__PURE__ */ jsx110(Highlight, { type: "info", className: "flex flex-col gap-[var(--ui-kit-gap)]", children: isNicknameInput && nicknameData ? /* @__PURE__ */ jsxs101(Fragment40, { children: [
|
|
23526
|
+
/* @__PURE__ */ jsxs101("div", { className: "flex items-start gap-[var(--ui-kit-gap)]", children: [
|
|
23527
|
+
nicknameData.avatarSvg ? /* @__PURE__ */ jsx110(
|
|
23528
|
+
"img",
|
|
23529
|
+
{
|
|
23530
|
+
src: nicknameData.avatarSvg,
|
|
23531
|
+
alt: nicknameData.handle,
|
|
23532
|
+
className: "w-12 h-12 rounded-full object-cover flex-shrink-0"
|
|
23533
|
+
}
|
|
23534
|
+
) : /* @__PURE__ */ jsx110("div", { className: "w-12 h-12 rounded-full bg-[var(--ui-kit-secondary)] flex items-center justify-center flex-shrink-0", children: /* @__PURE__ */ jsx110(AtSign3, { className: "w-6 h-6" }) }),
|
|
23535
|
+
/* @__PURE__ */ jsxs101("div", { className: "flex flex-1 flex-col gap-1", children: [
|
|
23536
|
+
/* @__PURE__ */ jsx110("span", { className: "font-medium text-[14px] leading-4 truncate", children: nicknameData.handle }),
|
|
23537
|
+
nicknameData.fingerprint && /* @__PURE__ */ jsxs101(
|
|
23538
|
+
"span",
|
|
23539
|
+
{
|
|
23540
|
+
className: cn(
|
|
23541
|
+
"flex items-center gap-[var(--ui-kit-gap)] text-[10px]",
|
|
23542
|
+
isFingerprintVerified ? "text-[var(--ui-kit-bg-success)]" : "text-[var(--ui-kit-bg-error)]"
|
|
23543
|
+
),
|
|
23544
|
+
children: [
|
|
23545
|
+
isFingerprintVerified ? /* @__PURE__ */ jsx110(ShieldCheck3, { className: "w-4 h-4 flex-shrink-0" }) : /* @__PURE__ */ jsx110(ShieldAlert2, { className: "w-4 h-4 flex-shrink-0" }),
|
|
23546
|
+
/* @__PURE__ */ jsxs101("span", { children: [
|
|
23547
|
+
"Fingerprint: ",
|
|
23548
|
+
nicknameData.fingerprint
|
|
23549
|
+
] }),
|
|
23550
|
+
/* @__PURE__ */ jsx110("span", { children: isFingerprintVerified ? "Verified" : "FAILED" })
|
|
23551
|
+
]
|
|
23552
|
+
}
|
|
23167
23553
|
),
|
|
23168
|
-
children:
|
|
23169
|
-
isFingerprintVerified ? /* @__PURE__ */ jsx110(ShieldCheck3, { className: "w-4 h-4 flex-shrink-0" }) : /* @__PURE__ */ jsx110(ShieldAlert2, { className: "w-4 h-4 flex-shrink-0" }),
|
|
23170
|
-
/* @__PURE__ */ jsxs101("span", { children: [
|
|
23171
|
-
"Fingerprint: ",
|
|
23172
|
-
nicknameData.fingerprint
|
|
23173
|
-
] }),
|
|
23174
|
-
/* @__PURE__ */ jsx110("span", { children: isFingerprintVerified ? "Verified" : "FAILED" })
|
|
23175
|
-
]
|
|
23176
|
-
}
|
|
23177
|
-
),
|
|
23178
|
-
/* @__PURE__ */ jsx110("span", { className: "text-[10px] text-[var(--ui-kit-fg-muted)]", children: `${resolvedAddress.slice(0, 6)}...${resolvedAddress.slice(-4)} : ` })
|
|
23179
|
-
] })
|
|
23180
|
-
] }),
|
|
23181
|
-
/* @__PURE__ */ jsxs101("div", { className: "border-t border-[var(--ui-kit-bd)] py-[var(--ui-kit-pd)] text-[10px]", children: [
|
|
23182
|
-
isNft ? /* @__PURE__ */ jsxs101("div", { className: "flex justify-between items-start", children: [
|
|
23183
|
-
/* @__PURE__ */ jsx110("span", { className: "text-[var(--ui-kit-fg-muted)]", children: "NFT:" }),
|
|
23184
|
-
/* @__PURE__ */ jsxs101("div", { className: "text-right", children: [
|
|
23185
|
-
/* @__PURE__ */ jsx110("span", { className: "font-semibold block", children: selectedAsset.nftMetadata?.name || selectedAsset.name }),
|
|
23186
|
-
selectedAsset.tokenId && /* @__PURE__ */ jsxs101("span", { className: "text-[10px] text-[var(--ui-kit-fg-muted)]", children: [
|
|
23187
|
-
"#",
|
|
23188
|
-
selectedAsset.tokenId.length > 10 ? `${selectedAsset.tokenId.slice(0, 8)}...` : selectedAsset.tokenId
|
|
23554
|
+
/* @__PURE__ */ jsx110("span", { className: "text-[10px] text-[var(--ui-kit-fg-muted)]", children: `${resolvedAddress.slice(0, 6)}...${resolvedAddress.slice(-4)} : ` })
|
|
23189
23555
|
] })
|
|
23190
|
-
] })
|
|
23191
|
-
|
|
23192
|
-
|
|
23193
|
-
|
|
23194
|
-
|
|
23195
|
-
|
|
23196
|
-
|
|
23197
|
-
|
|
23198
|
-
|
|
23556
|
+
] }),
|
|
23557
|
+
/* @__PURE__ */ jsxs101("div", { className: "border-t border-[var(--ui-kit-bd)] py-[var(--ui-kit-pd)] text-[10px]", children: [
|
|
23558
|
+
isNft ? /* @__PURE__ */ jsxs101("div", { className: "flex justify-between items-start", children: [
|
|
23559
|
+
/* @__PURE__ */ jsx110("span", { className: "text-[var(--ui-kit-fg-muted)]", children: "NFT:" }),
|
|
23560
|
+
/* @__PURE__ */ jsxs101("div", { className: "text-right", children: [
|
|
23561
|
+
/* @__PURE__ */ jsx110("span", { className: "font-semibold block", children: selectedAsset.nftMetadata?.name || selectedAsset.name }),
|
|
23562
|
+
selectedAsset.tokenId && /* @__PURE__ */ jsxs101("span", { className: "text-[10px] text-[var(--ui-kit-fg-muted)]", children: [
|
|
23563
|
+
"#",
|
|
23564
|
+
selectedAsset.tokenId.length > 10 ? `${selectedAsset.tokenId.slice(0, 8)}...` : selectedAsset.tokenId
|
|
23565
|
+
] })
|
|
23566
|
+
] })
|
|
23567
|
+
] }) : (
|
|
23568
|
+
// Fungible token details
|
|
23569
|
+
/* @__PURE__ */ jsxs101("div", { className: "flex justify-between leading-5 gap-[var(--ui-kit-gap)]", children: [
|
|
23570
|
+
/* @__PURE__ */ jsx110("span", { className: "text-[10px] text-[var(--ui-kit-fg-muted)]", children: t("passport:common.amount") }),
|
|
23571
|
+
/* @__PURE__ */ jsxs101("span", { className: "text-sm font-bold", children: [
|
|
23572
|
+
amount,
|
|
23573
|
+
" ",
|
|
23574
|
+
selectedAsset.symbol
|
|
23575
|
+
] })
|
|
23576
|
+
] })
|
|
23577
|
+
),
|
|
23578
|
+
/* @__PURE__ */ jsxs101("div", { className: "flex justify-between leading-5 gap-[var(--ui-kit-gap)]", children: [
|
|
23579
|
+
/* @__PURE__ */ jsx110("span", { className: "text-[10px] text-[var(--ui-kit-fg-muted)]", children: t("passport:common.network") }),
|
|
23580
|
+
/* @__PURE__ */ jsx110("span", { className: "text-sm font-bold", children: chainConfig.name })
|
|
23199
23581
|
] })
|
|
23200
23582
|
] })
|
|
23201
|
-
),
|
|
23202
|
-
|
|
23203
|
-
/* @__PURE__ */
|
|
23204
|
-
|
|
23205
|
-
|
|
23206
|
-
|
|
23207
|
-
|
|
23208
|
-
|
|
23209
|
-
|
|
23210
|
-
|
|
23211
|
-
|
|
23212
|
-
|
|
23213
|
-
|
|
23214
|
-
|
|
23215
|
-
|
|
23216
|
-
|
|
23217
|
-
|
|
23218
|
-
|
|
23219
|
-
|
|
23220
|
-
|
|
23221
|
-
|
|
23222
|
-
|
|
23583
|
+
] }) : /* @__PURE__ */ jsxs101(Fragment40, { children: [
|
|
23584
|
+
/* @__PURE__ */ jsx110("h3", { className: "font-medium mb-3 text-[var(--ui-kit-fg)]", children: "Transaction Details" }),
|
|
23585
|
+
/* @__PURE__ */ jsxs101("div", { className: "space-y-2 text-sm text-[var(--ui-kit-fg)]", children: [
|
|
23586
|
+
/* @__PURE__ */ jsxs101("div", { className: "flex justify-between", children: [
|
|
23587
|
+
/* @__PURE__ */ jsx110("span", { className: "text-[var(--ui-kit-fg-muted)]", children: "To:" }),
|
|
23588
|
+
/* @__PURE__ */ jsx110("span", { className: "font-mono text-xs", children: `${effectiveAddress.slice(0, 6)}...${effectiveAddress.slice(-4)}` })
|
|
23589
|
+
] }),
|
|
23590
|
+
isNft ? (
|
|
23591
|
+
// NFT details
|
|
23592
|
+
/* @__PURE__ */ jsx110(Fragment40, { children: /* @__PURE__ */ jsxs101("div", { className: "flex justify-between items-start", children: [
|
|
23593
|
+
/* @__PURE__ */ jsx110("span", { className: "text-[var(--ui-kit-fg-muted)]", children: "NFT:" }),
|
|
23594
|
+
/* @__PURE__ */ jsxs101("div", { className: "text-right", children: [
|
|
23595
|
+
/* @__PURE__ */ jsx110("span", { className: "font-semibold block", children: selectedAsset.nftMetadata?.name || selectedAsset.name }),
|
|
23596
|
+
selectedAsset.tokenId && /* @__PURE__ */ jsxs101("span", { className: "text-xs text-[var(--ui-kit-fg-muted)]", children: [
|
|
23597
|
+
"#",
|
|
23598
|
+
selectedAsset.tokenId.length > 10 ? `${selectedAsset.tokenId.slice(0, 8)}...` : selectedAsset.tokenId
|
|
23599
|
+
] })
|
|
23600
|
+
] })
|
|
23601
|
+
] }) })
|
|
23602
|
+
) : (
|
|
23603
|
+
// Fungible token details
|
|
23604
|
+
/* @__PURE__ */ jsxs101("div", { className: "flex justify-between leading-5 gap-[var(--ui-kit-gap)]", children: [
|
|
23605
|
+
/* @__PURE__ */ jsx110("span", { className: "text-[var(--ui-kit-fg-muted)]", children: t("passport:common.amount") }),
|
|
23606
|
+
/* @__PURE__ */ jsxs101("span", { className: "font-semibold", children: [
|
|
23607
|
+
amount,
|
|
23608
|
+
" ",
|
|
23609
|
+
selectedAsset.symbol
|
|
23610
|
+
] })
|
|
23223
23611
|
] })
|
|
23224
|
-
|
|
23225
|
-
|
|
23226
|
-
|
|
23227
|
-
|
|
23228
|
-
/* @__PURE__ */ jsxs101("div", { className: "flex justify-between leading-5 gap-[var(--ui-kit-gap)]", children: [
|
|
23229
|
-
/* @__PURE__ */ jsx110("span", { className: "text-[var(--ui-kit-fg-muted)]", children: t("passport:common.amount") }),
|
|
23230
|
-
/* @__PURE__ */ jsxs101("span", { className: "font-semibold", children: [
|
|
23231
|
-
amount,
|
|
23232
|
-
" ",
|
|
23233
|
-
selectedAsset.symbol
|
|
23612
|
+
),
|
|
23613
|
+
/* @__PURE__ */ jsxs101("div", { className: "flex justify-between leading-5 gap-[var(--ui-kit-gap)]", children: [
|
|
23614
|
+
/* @__PURE__ */ jsx110("span", { className: "text-[var(--ui-kit-fg-muted)]", children: t("passport:common.network") }),
|
|
23615
|
+
/* @__PURE__ */ jsx110("span", { children: chainConfig.name })
|
|
23234
23616
|
] })
|
|
23235
23617
|
] })
|
|
23236
|
-
),
|
|
23237
|
-
/* @__PURE__ */ jsxs101(
|
|
23238
|
-
|
|
23239
|
-
|
|
23240
|
-
|
|
23241
|
-
|
|
23242
|
-
|
|
23243
|
-
|
|
23244
|
-
|
|
23245
|
-
|
|
23246
|
-
|
|
23247
|
-
|
|
23248
|
-
|
|
23249
|
-
|
|
23250
|
-
|
|
23251
|
-
|
|
23252
|
-
|
|
23253
|
-
]
|
|
23254
|
-
}
|
|
23255
|
-
)
|
|
23256
|
-
] });
|
|
23618
|
+
] }) }),
|
|
23619
|
+
/* @__PURE__ */ jsxs101(
|
|
23620
|
+
Button,
|
|
23621
|
+
{
|
|
23622
|
+
onClick: () => handleConfirm(),
|
|
23623
|
+
disabled: isTransactionPending,
|
|
23624
|
+
className: "w-full",
|
|
23625
|
+
size: "large",
|
|
23626
|
+
children: [
|
|
23627
|
+
isTransactionPending && /* @__PURE__ */ jsx110(Loader21, { className: "h-4 w-4 animate-spin" }),
|
|
23628
|
+
t("passport:common.confirm")
|
|
23629
|
+
]
|
|
23630
|
+
}
|
|
23631
|
+
)
|
|
23632
|
+
]
|
|
23633
|
+
}
|
|
23634
|
+
);
|
|
23257
23635
|
}
|
|
23258
23636
|
var init_ConfirmSendStep = __esm({
|
|
23259
23637
|
"src/internal/components/SendMenu/send/sendSteps/ConfirmSendStep.tsx"() {
|
|
@@ -23261,6 +23639,7 @@ var init_ConfirmSendStep = __esm({
|
|
|
23261
23639
|
init_i18n();
|
|
23262
23640
|
init_priceFormatter();
|
|
23263
23641
|
init_utils2();
|
|
23642
|
+
init_Onboarding();
|
|
23264
23643
|
init_button();
|
|
23265
23644
|
init_highlight();
|
|
23266
23645
|
init_useFlowSelector();
|
|
@@ -23281,7 +23660,7 @@ var init_sendSteps = __esm({
|
|
|
23281
23660
|
import { CheckCircle2 as CheckCircle26, Loader as Loader27 } from "lucide-react";
|
|
23282
23661
|
import { useEffect as useEffect46, useMemo as useMemo15 } from "react";
|
|
23283
23662
|
import { parseUnits as parseUnits2 } from "viem";
|
|
23284
|
-
import { Fragment as
|
|
23663
|
+
import { Fragment as Fragment41, jsx as jsx111, jsxs as jsxs102 } from "react/jsx-runtime";
|
|
23285
23664
|
function SendMenu() {
|
|
23286
23665
|
const address = useSession((st) => st.address);
|
|
23287
23666
|
const activeChainId = useSession((st) => st.activeChainId);
|
|
@@ -23379,7 +23758,7 @@ function SendMenu() {
|
|
|
23379
23758
|
break;
|
|
23380
23759
|
}
|
|
23381
23760
|
}, [txStep, selectedAsset, isNft, t]);
|
|
23382
|
-
return /* @__PURE__ */ jsxs102(
|
|
23761
|
+
return /* @__PURE__ */ jsxs102(Fragment41, { children: [
|
|
23383
23762
|
txStep === "select-asset" && /* @__PURE__ */ jsx111(AssetList, { assets }),
|
|
23384
23763
|
txStep === "input" && /* @__PURE__ */ jsx111(
|
|
23385
23764
|
InputSendStep,
|
|
@@ -23406,7 +23785,7 @@ function SendMenu() {
|
|
|
23406
23785
|
/* @__PURE__ */ jsx111("span", { children: t("passport:sendMenu.pendingStepMsg") })
|
|
23407
23786
|
] })
|
|
23408
23787
|
] }),
|
|
23409
|
-
txStep === "success" && userOpHash && /* @__PURE__ */ jsxs102(
|
|
23788
|
+
txStep === "success" && userOpHash && /* @__PURE__ */ jsxs102(Fragment41, { children: [
|
|
23410
23789
|
/* @__PURE__ */ jsxs102(Highlight, { type: "success", className: "flex gap-[var(--ui-kit-gap)]", children: [
|
|
23411
23790
|
/* @__PURE__ */ jsx111(CheckCircle26, { className: "h-4 w-4" }),
|
|
23412
23791
|
/* @__PURE__ */ jsxs102("span", { className: "flex-1", children: [
|
|
@@ -23453,17 +23832,63 @@ var init_send = __esm({
|
|
|
23453
23832
|
}
|
|
23454
23833
|
});
|
|
23455
23834
|
|
|
23456
|
-
// src/internal/components/SendMenu/
|
|
23457
|
-
import {
|
|
23835
|
+
// src/internal/components/SendMenu/useSendMenuParams.ts
|
|
23836
|
+
import { keys as keys2 } from "lodash-es";
|
|
23458
23837
|
import { useEffect as useEffect47 } from "react";
|
|
23838
|
+
function useSendMenuParams() {
|
|
23839
|
+
useEffect47(() => {
|
|
23840
|
+
const { pageParams, setPageParams } = useLayoutDataStore.getState();
|
|
23841
|
+
if (!pageParams || !keys2(pageParams).length) return;
|
|
23842
|
+
console.log("[SEND PARAMS]", pageParams);
|
|
23843
|
+
const { sendFlow, asset, to, amount } = pageParams || {};
|
|
23844
|
+
const {
|
|
23845
|
+
setAmount: setSendAmount,
|
|
23846
|
+
setRecipient: setSendRecipient,
|
|
23847
|
+
setSelectedAsset: setSendSelectedAsset
|
|
23848
|
+
} = useSendStore.getState();
|
|
23849
|
+
const { setAmount: setBridgeAmount } = useBridgeStore.getState();
|
|
23850
|
+
useFlowSelectorStore.getState().setFlow(sendFlow);
|
|
23851
|
+
switch (sendFlow) {
|
|
23852
|
+
//
|
|
23853
|
+
case "send":
|
|
23854
|
+
switch (true) {
|
|
23855
|
+
case !!asset:
|
|
23856
|
+
setSendAmount(String(amount));
|
|
23857
|
+
case !!to:
|
|
23858
|
+
setSendRecipient(to);
|
|
23859
|
+
case !!amount:
|
|
23860
|
+
setSendSelectedAsset(asset);
|
|
23861
|
+
}
|
|
23862
|
+
break;
|
|
23863
|
+
//
|
|
23864
|
+
case "bridge":
|
|
23865
|
+
switch (true) {
|
|
23866
|
+
case !!amount:
|
|
23867
|
+
setBridgeAmount(String(amount));
|
|
23868
|
+
}
|
|
23869
|
+
break;
|
|
23870
|
+
default:
|
|
23871
|
+
return setPageParams(null);
|
|
23872
|
+
}
|
|
23873
|
+
setPageParams(null);
|
|
23874
|
+
}, []);
|
|
23875
|
+
}
|
|
23876
|
+
var init_useSendMenuParams = __esm({
|
|
23877
|
+
"src/internal/components/SendMenu/useSendMenuParams.ts"() {
|
|
23878
|
+
init_useLayoutDataStore();
|
|
23879
|
+
init_useBridgeStore();
|
|
23880
|
+
init_useSendStore();
|
|
23881
|
+
init_useFlowSelector();
|
|
23882
|
+
}
|
|
23883
|
+
});
|
|
23884
|
+
|
|
23885
|
+
// src/internal/components/SendMenu/SendFlowSelector.tsx
|
|
23886
|
+
import { ArrowLeft as ArrowLeft19, ArrowRightIcon as ArrowRightIcon2, ArrowRightLeftIcon as ArrowRightLeftIcon2, CircleQuestionMarkIcon as CircleQuestionMarkIcon2, InfoIcon as InfoIcon6 } from "lucide-react";
|
|
23887
|
+
import { useEffect as useEffect48 } from "react";
|
|
23459
23888
|
import { jsx as jsx112, jsxs as jsxs103 } from "react/jsx-runtime";
|
|
23460
23889
|
function SelectorFlowButtons() {
|
|
23461
23890
|
const { t } = useT();
|
|
23462
23891
|
const selectorFlow = useFlowSelectorStore((st) => st.flow);
|
|
23463
|
-
const sendStep = useSendStore((st) => st.txStep);
|
|
23464
|
-
const bridgeStep = useBridgeStore((st) => st.bridgeStep);
|
|
23465
|
-
const isButtonsShown = selectorFlow === "send" && sendStep === "input" || selectorFlow === "bridge" && bridgeStep === "select";
|
|
23466
|
-
if (!isButtonsShown) return null;
|
|
23467
23892
|
return /* @__PURE__ */ jsxs103(
|
|
23468
23893
|
"div",
|
|
23469
23894
|
{
|
|
@@ -23511,6 +23936,7 @@ function SelectorFlowButtons() {
|
|
|
23511
23936
|
}
|
|
23512
23937
|
function SendFlowSelector() {
|
|
23513
23938
|
const { t } = useT();
|
|
23939
|
+
useSendMenuParams();
|
|
23514
23940
|
const setPage = useLayoutDataStore((st) => st.setPage);
|
|
23515
23941
|
const maxScrollHeight = useLayoutStore((st) => st.maxScrollHeight);
|
|
23516
23942
|
const isUiLocked = useFlowSelectorStore((st) => st.isUiLocked);
|
|
@@ -23518,15 +23944,19 @@ function SendFlowSelector() {
|
|
|
23518
23944
|
const error = useFlowSelectorStore((st) => st.error);
|
|
23519
23945
|
const menuTitle = useFlowSelectorStore((st) => st.menuTitle);
|
|
23520
23946
|
const selectorFlow = useFlowSelectorStore((st) => st.flow);
|
|
23521
|
-
|
|
23947
|
+
const sendStep = useSendStore((st) => st.txStep);
|
|
23948
|
+
const bridgeStep = useBridgeStore((st) => st.bridgeStep);
|
|
23949
|
+
useEffect48(
|
|
23522
23950
|
() => () => {
|
|
23523
23951
|
useFlowSelectorStore.getState().setError(null);
|
|
23524
23952
|
},
|
|
23525
23953
|
[]
|
|
23526
23954
|
);
|
|
23955
|
+
const isSendFlowInitialState = selectorFlow === "send" && sendStep === "input" || selectorFlow === "bridge" && bridgeStep === "select";
|
|
23527
23956
|
return /* @__PURE__ */ jsx112(
|
|
23528
23957
|
"div",
|
|
23529
23958
|
{
|
|
23959
|
+
ref: (inst) => onboarder.registerElement("sendmenu-page" /* sendMenu */, inst),
|
|
23530
23960
|
style: {
|
|
23531
23961
|
"--ui-kit-scrollbar-mah": `${maxScrollHeight}px`,
|
|
23532
23962
|
"--ui-kit-list-scrollbar-pd-r": "var(--ui-kit-pd)"
|
|
@@ -23544,8 +23974,8 @@ function SendFlowSelector() {
|
|
|
23544
23974
|
onClick: () => {
|
|
23545
23975
|
useFlowSelectorStore.getState().setError(null);
|
|
23546
23976
|
if (selectorFlow === "bridge") {
|
|
23547
|
-
const { bridgeStep, setBridgeStep } = useBridgeStore.getState();
|
|
23548
|
-
switch (
|
|
23977
|
+
const { bridgeStep: bridgeStep2, setBridgeStep } = useBridgeStore.getState();
|
|
23978
|
+
switch (bridgeStep2) {
|
|
23549
23979
|
case "select":
|
|
23550
23980
|
return setPage("main-menu" /* MAIN_MENU */);
|
|
23551
23981
|
// case ''
|
|
@@ -23570,13 +24000,35 @@ function SendFlowSelector() {
|
|
|
23570
24000
|
),
|
|
23571
24001
|
/* @__PURE__ */ jsx112("span", { className: "text-xl font-semibold", children: menuTitle })
|
|
23572
24002
|
] }),
|
|
23573
|
-
/* @__PURE__ */
|
|
24003
|
+
/* @__PURE__ */ jsxs103("div", { className: "flex items-center gap-[var(--ui-kit-gap)]", children: [
|
|
24004
|
+
isSendFlowInitialState && /* @__PURE__ */ jsx112(
|
|
24005
|
+
Button,
|
|
24006
|
+
{
|
|
24007
|
+
ref: (inst) => onboarder.registerElement("sendmenu-tour-button" /* tourButton */, inst),
|
|
24008
|
+
variant: "ghost",
|
|
24009
|
+
size: "icon",
|
|
24010
|
+
className: "flex-none",
|
|
24011
|
+
onClick: () => {
|
|
24012
|
+
switch (selectorFlow) {
|
|
24013
|
+
case "send":
|
|
24014
|
+
onboarder.startTour(SEND_MENU_TOUR);
|
|
24015
|
+
break;
|
|
24016
|
+
case "bridge":
|
|
24017
|
+
onboarder.startTour(BRIDGE_MENU_TOUR);
|
|
24018
|
+
break;
|
|
24019
|
+
}
|
|
24020
|
+
},
|
|
24021
|
+
children: /* @__PURE__ */ jsx112(CircleQuestionMarkIcon2, { className: "h-4 w-4" })
|
|
24022
|
+
}
|
|
24023
|
+
),
|
|
24024
|
+
/* @__PURE__ */ jsx112(BridgeHistorySwitch, {})
|
|
24025
|
+
] })
|
|
23574
24026
|
] }),
|
|
23575
|
-
/* @__PURE__ */ jsx112(SelectorFlowButtons, {}),
|
|
24027
|
+
isSendFlowInitialState && /* @__PURE__ */ jsx112(SelectorFlowButtons, {}),
|
|
23576
24028
|
SELECTOR_FLOW[selectorFlow],
|
|
23577
24029
|
error && /* @__PURE__ */ jsxs103(Highlight, { type: "error", className: "w-full flex flex-col gap-[var(--ui-kit-gap)]", children: [
|
|
23578
24030
|
/* @__PURE__ */ jsxs103("div", { className: "w-full flex gap-[var(--ui-kit-gap)]", children: [
|
|
23579
|
-
/* @__PURE__ */ jsx112(
|
|
24031
|
+
/* @__PURE__ */ jsx112(InfoIcon6, { className: "h-4 w-4 flex-none" }),
|
|
23580
24032
|
/* @__PURE__ */ jsx112("span", { children: error })
|
|
23581
24033
|
] }),
|
|
23582
24034
|
/* @__PURE__ */ jsx112(
|
|
@@ -23603,11 +24055,14 @@ var init_SendFlowSelector = __esm({
|
|
|
23603
24055
|
init_useLayoutStore();
|
|
23604
24056
|
init_utils2();
|
|
23605
24057
|
init_Expandable2();
|
|
24058
|
+
init_Onboarding();
|
|
23606
24059
|
init_button();
|
|
23607
24060
|
init_highlight();
|
|
23608
24061
|
init_hyperbridge();
|
|
24062
|
+
init_onboarding_setup2();
|
|
23609
24063
|
init_send();
|
|
23610
24064
|
init_useFlowSelector();
|
|
24065
|
+
init_useSendMenuParams();
|
|
23611
24066
|
SELECTOR_FLOW = {
|
|
23612
24067
|
send: /* @__PURE__ */ jsx112(SendMenu, {}),
|
|
23613
24068
|
bridge: /* @__PURE__ */ jsx112(HyperlaneBridge, {})
|
|
@@ -23619,6 +24074,7 @@ var init_SendFlowSelector = __esm({
|
|
|
23619
24074
|
var init_SendMenu2 = __esm({
|
|
23620
24075
|
"src/internal/components/SendMenu/index.ts"() {
|
|
23621
24076
|
init_SendFlowSelector();
|
|
24077
|
+
init_onboarding_setup2();
|
|
23622
24078
|
}
|
|
23623
24079
|
});
|
|
23624
24080
|
|
|
@@ -23684,7 +24140,7 @@ var init_constants8 = __esm({
|
|
|
23684
24140
|
// src/internal/components/SettingsMenu/SettingsMenu.tsx
|
|
23685
24141
|
import { useQuery as useQuery24 } from "@tanstack/react-query";
|
|
23686
24142
|
import { ArrowLeft as ArrowLeft20, HardDrive as HardDrive3 } from "lucide-react";
|
|
23687
|
-
import { useEffect as
|
|
24143
|
+
import { useEffect as useEffect49 } from "react";
|
|
23688
24144
|
import { jsx as jsx113, jsxs as jsxs104 } from "react/jsx-runtime";
|
|
23689
24145
|
function useSettingsButtons() {
|
|
23690
24146
|
const config = useProviderConfig().config;
|
|
@@ -23703,7 +24159,7 @@ function useSettingsButtons() {
|
|
|
23703
24159
|
if (proMode) {
|
|
23704
24160
|
settingsButtons.push({ id: "devices" /* DEVICES */, name: "Guardians", Icon: HardDrive3 });
|
|
23705
24161
|
}
|
|
23706
|
-
|
|
24162
|
+
useEffect49(() => {
|
|
23707
24163
|
const cssvEl = document.querySelector(".embarkai-ui-scope");
|
|
23708
24164
|
if (!cssvEl || !window?.getComputedStyle) {
|
|
23709
24165
|
return;
|
|
@@ -24511,7 +24967,7 @@ var init_utils11 = __esm({
|
|
|
24511
24967
|
|
|
24512
24968
|
// src/internal/components/TransactionsMenu/TransactionsGroup.tsx
|
|
24513
24969
|
import { ChevronDown, ChevronLeft as ChevronLeft2, ChevronRight as ChevronRight5, ChevronUp, Copy as Copy3 } from "lucide-react";
|
|
24514
|
-
import { Fragment as
|
|
24970
|
+
import { Fragment as Fragment42, jsx as jsx115, jsxs as jsxs106 } from "react/jsx-runtime";
|
|
24515
24971
|
function InternalTransaction({ internal, assetSymbol, assetDecimals }) {
|
|
24516
24972
|
const internalSymbol = internal.assetSymbol || assetSymbol;
|
|
24517
24973
|
const internalDecimals = internal.decimals ?? assetDecimals;
|
|
@@ -24586,7 +25042,7 @@ function TransactionsGroup(props) {
|
|
|
24586
25042
|
}
|
|
24587
25043
|
) })
|
|
24588
25044
|
] }),
|
|
24589
|
-
internalsToRender.length > 0 && /* @__PURE__ */ jsxs106(
|
|
25045
|
+
internalsToRender.length > 0 && /* @__PURE__ */ jsxs106(Fragment42, { children: [
|
|
24590
25046
|
/* @__PURE__ */ jsx115("div", { className: "w-full flex items-center h-4", children: /* @__PURE__ */ jsx115("div", { style: { borderTop: "1px solid var(--ui-kit-bd)" }, className: "flex-1" }) }),
|
|
24591
25047
|
/* @__PURE__ */ jsxs106(
|
|
24592
25048
|
"div",
|
|
@@ -24642,7 +25098,7 @@ var init_TransactionsGroup = __esm({
|
|
|
24642
25098
|
// src/internal/components/TransactionsMenu/TransactionsMenu.tsx
|
|
24643
25099
|
import { useQuery as useQuery25, useQueryClient as useQueryClient25 } from "@tanstack/react-query";
|
|
24644
25100
|
import { ArrowLeft as ArrowLeft22, Loader as Loader28, RefreshCw as RefreshCw3, XCircle } from "lucide-react";
|
|
24645
|
-
import { useCallback as useCallback30, useState as
|
|
25101
|
+
import { useCallback as useCallback30, useState as useState27 } from "react";
|
|
24646
25102
|
import { jsx as jsx116, jsxs as jsxs107 } from "react/jsx-runtime";
|
|
24647
25103
|
function TransactionsMenu() {
|
|
24648
25104
|
const qc = useQueryClient25();
|
|
@@ -24651,7 +25107,7 @@ function TransactionsMenu() {
|
|
|
24651
25107
|
const { t } = useT();
|
|
24652
25108
|
const setPage = useLayoutDataStore((st) => st.setPage);
|
|
24653
25109
|
const maxScrollHeight = useLayoutStore((st) => st.maxScrollHeight);
|
|
24654
|
-
const [expandedGroups, setExpandedGroups] =
|
|
25110
|
+
const [expandedGroups, setExpandedGroups] = useState27({});
|
|
24655
25111
|
const historySupported = isTransactionHistorySupported(chainConfig?.id);
|
|
24656
25112
|
const {
|
|
24657
25113
|
data: txHistoryGroups = [],
|
|
@@ -24903,7 +25359,7 @@ var init_PageMap = __esm({
|
|
|
24903
25359
|
});
|
|
24904
25360
|
|
|
24905
25361
|
// src/internal/hooks/usePageMapper.tsx
|
|
24906
|
-
import { useCallback as useCallback31, useEffect as
|
|
25362
|
+
import { useCallback as useCallback31, useEffect as useEffect50 } from "react";
|
|
24907
25363
|
import { jsx as jsx117 } from "react/jsx-runtime";
|
|
24908
25364
|
function usePageMapper() {
|
|
24909
25365
|
const page = useLayoutDataStore((st) => st.page);
|
|
@@ -24936,7 +25392,7 @@ function usePageMapper() {
|
|
|
24936
25392
|
},
|
|
24937
25393
|
[setDialogContent, setDialogDescription, setDialogTitle, setIsDialogOpen]
|
|
24938
25394
|
);
|
|
24939
|
-
|
|
25395
|
+
useEffect50(() => {
|
|
24940
25396
|
if (page === null) return closeDialog();
|
|
24941
25397
|
const pageItem = PAGE_MAP[page];
|
|
24942
25398
|
if (!pageItem) {
|
|
@@ -24959,20 +25415,20 @@ var init_usePageMapper = __esm({
|
|
|
24959
25415
|
});
|
|
24960
25416
|
|
|
24961
25417
|
// src/internal/hooks/useSettingsNotifications.ts
|
|
24962
|
-
import { useEffect as
|
|
25418
|
+
import { useEffect as useEffect51 } from "react";
|
|
24963
25419
|
function useSettingsNotifications() {
|
|
24964
25420
|
const setSettingsNotifications = useLayoutDataStore((st) => st.setSettingsNotifications);
|
|
24965
25421
|
const providers = jwtTokenManager2.getProviders();
|
|
24966
25422
|
const hasEmail = providers.includes("email");
|
|
24967
25423
|
const { data: userProfile = null } = useUserProfile();
|
|
24968
|
-
|
|
25424
|
+
useEffect51(() => {
|
|
24969
25425
|
const isKYCVerified = userProfile?.kycDetails?.kycStatus === "verified";
|
|
24970
25426
|
setSettingsNotifications({
|
|
24971
25427
|
...COMPLETE_KYC_PROGRESS,
|
|
24972
25428
|
status: isKYCVerified ? "resolved" : "active"
|
|
24973
25429
|
});
|
|
24974
25430
|
}, [userProfile, setSettingsNotifications]);
|
|
24975
|
-
|
|
25431
|
+
useEffect51(() => {
|
|
24976
25432
|
setSettingsNotifications({
|
|
24977
25433
|
...EMAIL_NOT_CONNECTED_NOTIFICATION,
|
|
24978
25434
|
status: hasEmail ? "resolved" : "active"
|
|
@@ -25004,7 +25460,7 @@ var init_package = __esm({
|
|
|
25004
25460
|
"package.json"() {
|
|
25005
25461
|
package_default = {
|
|
25006
25462
|
name: "@embarkai/ui-kit",
|
|
25007
|
-
version: "0.4.
|
|
25463
|
+
version: "0.4.74",
|
|
25008
25464
|
description: "React UI components and hooks for EmbarkAI authentication and Account Abstraction",
|
|
25009
25465
|
type: "module",
|
|
25010
25466
|
main: "./dist/index.cjs",
|
|
@@ -25247,8 +25703,8 @@ var init_Footer2 = __esm({
|
|
|
25247
25703
|
|
|
25248
25704
|
// src/internal/components/Header/Header.tsx
|
|
25249
25705
|
import { Copy as Copy4, Loader as Loader30 } from "lucide-react";
|
|
25250
|
-
import { useCallback as useCallback32, useRef as useRef20, useState as
|
|
25251
|
-
import { Fragment as
|
|
25706
|
+
import { useCallback as useCallback32, useRef as useRef20, useState as useState28 } from "react";
|
|
25707
|
+
import { Fragment as Fragment43, jsx as jsx119, jsxs as jsxs109 } from "react/jsx-runtime";
|
|
25252
25708
|
function formatAddress2(addr) {
|
|
25253
25709
|
if (!addr) return "";
|
|
25254
25710
|
return `${addr.slice(0, 10)}...${addr.slice(-4)}`;
|
|
@@ -25259,8 +25715,8 @@ function Header() {
|
|
|
25259
25715
|
const chainConfig = useSession((st) => st.chainConfig);
|
|
25260
25716
|
const { t } = useT();
|
|
25261
25717
|
const proMode = useProMode();
|
|
25262
|
-
const [proToast, setProToast] =
|
|
25263
|
-
const [copied, setCopied] =
|
|
25718
|
+
const [proToast, setProToast] = useState28(false);
|
|
25719
|
+
const [copied, setCopied] = useState28(false);
|
|
25264
25720
|
const clickCountRef = useRef20(0);
|
|
25265
25721
|
const clickTimerRef = useRef20(null);
|
|
25266
25722
|
const handleAvatarClick = useCallback32(() => {
|
|
@@ -25310,7 +25766,7 @@ function Header() {
|
|
|
25310
25766
|
className: "flex-1 flex flex-col justify-center gap-1",
|
|
25311
25767
|
children: [
|
|
25312
25768
|
isProfileLoading && /* @__PURE__ */ jsx119(Loader30, { className: "w-4 h-4 animate-spin" }),
|
|
25313
|
-
!!address && !isProfileLoading && !!profile && /* @__PURE__ */ jsxs109(
|
|
25769
|
+
!!address && !isProfileLoading && !!profile && /* @__PURE__ */ jsxs109(Fragment43, { children: [
|
|
25314
25770
|
/* @__PURE__ */ jsxs109("div", { className: "w-full flex items-center gap-[var(--ui-kit-gap)]", children: [
|
|
25315
25771
|
/* @__PURE__ */ jsx119(
|
|
25316
25772
|
"span",
|
|
@@ -25569,7 +26025,7 @@ var init_visually_hidden = __esm({
|
|
|
25569
26025
|
|
|
25570
26026
|
// src/internal/components/Dialog/Dialog.tsx
|
|
25571
26027
|
import { AnimatePresence, motion } from "framer-motion";
|
|
25572
|
-
import { useEffect as
|
|
26028
|
+
import { useEffect as useEffect52 } from "react";
|
|
25573
26029
|
import { jsx as jsx122, jsxs as jsxs111 } from "react/jsx-runtime";
|
|
25574
26030
|
function Dialog2() {
|
|
25575
26031
|
const config = useProviderConfig().config;
|
|
@@ -25581,7 +26037,7 @@ function Dialog2() {
|
|
|
25581
26037
|
const isWalletLinking = useLayoutDataStore((st) => st.isWalletLinking);
|
|
25582
26038
|
const setPage = useLayoutDataStore((st) => st.setPage);
|
|
25583
26039
|
const { colorMode, isDialogOpen, dialogTitle, dialogDescription, dialogContent, isDialogForced, setIsSettings } = useLayoutStore();
|
|
25584
|
-
|
|
26040
|
+
useEffect52(() => setIsSettings(!!session), [session, setIsSettings]);
|
|
25585
26041
|
usePageMapper();
|
|
25586
26042
|
useAutoConnect();
|
|
25587
26043
|
useBackupStatusChanges();
|
|
@@ -25647,7 +26103,7 @@ var init_Dialog2 = __esm({
|
|
|
25647
26103
|
});
|
|
25648
26104
|
|
|
25649
26105
|
// src/internal/components/DirectWalletHandler.tsx
|
|
25650
|
-
import { useEffect as
|
|
26106
|
+
import { useEffect as useEffect53 } from "react";
|
|
25651
26107
|
import { useAccount } from "wagmi";
|
|
25652
26108
|
function DirectWalletHandler() {
|
|
25653
26109
|
const walletMode = useProviderConfig().config.current?.wallet?.mode || "linked";
|
|
@@ -25659,13 +26115,13 @@ function DirectWalletHandler() {
|
|
|
25659
26115
|
const setExternalChainId = useExternalWalletStore((st) => st.setExternalChainId);
|
|
25660
26116
|
const setConfigMode = useExternalWalletStore((st) => st.setConfigMode);
|
|
25661
26117
|
const setActiveMode = useExternalWalletStore((st) => st.setActiveMode);
|
|
25662
|
-
|
|
26118
|
+
useEffect53(() => {
|
|
25663
26119
|
setConfigMode(walletMode);
|
|
25664
26120
|
if (walletMode !== "both") {
|
|
25665
26121
|
setActiveMode(walletMode);
|
|
25666
26122
|
}
|
|
25667
26123
|
}, [walletMode, setConfigMode, setActiveMode]);
|
|
25668
|
-
|
|
26124
|
+
useEffect53(() => {
|
|
25669
26125
|
if (isConnected && address && !isExternalConnected && connector && chain?.id) {
|
|
25670
26126
|
setExternalWallet({
|
|
25671
26127
|
address,
|
|
@@ -25674,17 +26130,17 @@ function DirectWalletHandler() {
|
|
|
25674
26130
|
});
|
|
25675
26131
|
}
|
|
25676
26132
|
}, [isConnected, address, isExternalConnected, connector, chain?.id, setExternalWallet]);
|
|
25677
|
-
|
|
26133
|
+
useEffect53(() => {
|
|
25678
26134
|
if (isExternalConnected && !isConnected) {
|
|
25679
26135
|
clearExternalWallet();
|
|
25680
26136
|
}
|
|
25681
26137
|
}, [isConnected, isExternalConnected, clearExternalWallet]);
|
|
25682
|
-
|
|
26138
|
+
useEffect53(() => {
|
|
25683
26139
|
if (isExternalConnected && isConnected && chain?.id) {
|
|
25684
26140
|
setExternalChainId(chain.id);
|
|
25685
26141
|
}
|
|
25686
26142
|
}, [chain?.id, isConnected, isExternalConnected, setExternalChainId]);
|
|
25687
|
-
|
|
26143
|
+
useEffect53(() => {
|
|
25688
26144
|
if (isExternalConnected && isConnected && address && address !== externalAddress && connector && chain?.id) {
|
|
25689
26145
|
setExternalWallet({
|
|
25690
26146
|
address,
|
|
@@ -25759,7 +26215,7 @@ var init_TssManager = __esm({
|
|
|
25759
26215
|
// src/internal/components/WalletConnectHandler.tsx
|
|
25760
26216
|
import { useConnectModal as useConnectModal2 } from "@rainbow-me/rainbowkit";
|
|
25761
26217
|
import { useMutation as useMutation23, useQueryClient as useQueryClient27 } from "@tanstack/react-query";
|
|
25762
|
-
import React28, { useCallback as useCallback34, useEffect as
|
|
26218
|
+
import React28, { useCallback as useCallback34, useEffect as useEffect54 } from "react";
|
|
25763
26219
|
import { useAccount as useAccount2, useDisconnect as useDisconnect4, useSignMessage as useSignMessage2 } from "wagmi";
|
|
25764
26220
|
function WalletConnectHandler() {
|
|
25765
26221
|
const qc = useQueryClient27();
|
|
@@ -25814,7 +26270,7 @@ function WalletConnectHandler() {
|
|
|
25814
26270
|
const [hasStartedLinking, setHasStartedLinking] = React28.useState(false);
|
|
25815
26271
|
const [modalWasOpened, setModalWasOpened] = React28.useState(false);
|
|
25816
26272
|
const [pendingModalOpen, setPendingModalOpen] = React28.useState(false);
|
|
25817
|
-
|
|
26273
|
+
useEffect54(() => {
|
|
25818
26274
|
if (isWalletLinking && !hasStartedLinking) {
|
|
25819
26275
|
console.log("[WalletConnectHandler] Starting wallet link flow:", {
|
|
25820
26276
|
isConnected,
|
|
@@ -25852,18 +26308,18 @@ function WalletConnectHandler() {
|
|
|
25852
26308
|
setProviderType,
|
|
25853
26309
|
walletMode
|
|
25854
26310
|
]);
|
|
25855
|
-
|
|
26311
|
+
useEffect54(() => {
|
|
25856
26312
|
if (pendingModalOpen && !isConnected && openConnectModal) {
|
|
25857
26313
|
setPendingModalOpen(false);
|
|
25858
26314
|
openConnectModal();
|
|
25859
26315
|
}
|
|
25860
26316
|
}, [pendingModalOpen, isConnected, openConnectModal]);
|
|
25861
|
-
|
|
26317
|
+
useEffect54(() => {
|
|
25862
26318
|
if (connectModalOpen && hasStartedLinking) {
|
|
25863
26319
|
setModalWasOpened(true);
|
|
25864
26320
|
}
|
|
25865
26321
|
}, [connectModalOpen, hasStartedLinking]);
|
|
25866
|
-
|
|
26322
|
+
useEffect54(() => {
|
|
25867
26323
|
if (modalWasOpened && !connectModalOpen && !isConnected && isWalletLinking) {
|
|
25868
26324
|
console.log("[WalletConnectHandler] Modal closed without connecting");
|
|
25869
26325
|
onLinkingComplete(false);
|
|
@@ -25871,7 +26327,7 @@ function WalletConnectHandler() {
|
|
|
25871
26327
|
setModalWasOpened(false);
|
|
25872
26328
|
}
|
|
25873
26329
|
}, [connectModalOpen, modalWasOpened, isConnected, isWalletLinking]);
|
|
25874
|
-
|
|
26330
|
+
useEffect54(() => {
|
|
25875
26331
|
if (isWalletLinking) {
|
|
25876
26332
|
const timeout = setTimeout(() => {
|
|
25877
26333
|
console.warn("[WalletConnectHandler] Wallet linking timed out, resetting state");
|
|
@@ -25991,7 +26447,7 @@ function WalletConnectHandler() {
|
|
|
25991
26447
|
setPage(passportWalletAddress ? "manage-wallet" /* MANAGE_WALLET */ : "auth" /* AUTH */);
|
|
25992
26448
|
}
|
|
25993
26449
|
});
|
|
25994
|
-
|
|
26450
|
+
useEffect54(() => {
|
|
25995
26451
|
if (!!chain?.id && isConnected && walletAddress && isWalletLinking && hasStartedLinking && modalWasOpened && !pendingModalOpen) {
|
|
25996
26452
|
console.log("[WalletConnectHandler] handleWalletSign triggered");
|
|
25997
26453
|
if (!passportWalletAddress) {
|
|
@@ -26001,7 +26457,7 @@ function WalletConnectHandler() {
|
|
|
26001
26457
|
handleWalletSign({ chainId: chain.id, signingWalletAddress: walletAddress });
|
|
26002
26458
|
}
|
|
26003
26459
|
}, [chain, isConnected, walletAddress, isWalletLinking, hasStartedLinking, modalWasOpened, pendingModalOpen]);
|
|
26004
|
-
|
|
26460
|
+
useEffect54(() => {
|
|
26005
26461
|
if (isConnected && !chain?.id && isWalletLinking && hasStartedLinking && !connectModalOpen && !isWalletSigning) {
|
|
26006
26462
|
const timeout = setTimeout(() => {
|
|
26007
26463
|
console.warn("[WalletConnectHandler] Wallet connected but chain info missing, resetting");
|
|
@@ -26044,7 +26500,7 @@ import {
|
|
|
26044
26500
|
getChainConfig as getChainConfig12,
|
|
26045
26501
|
getViemChain as getViemChain2
|
|
26046
26502
|
} from "@embarkai/core/read";
|
|
26047
|
-
import { Fragment as
|
|
26503
|
+
import { Fragment as Fragment44 } from "react";
|
|
26048
26504
|
import { create as create16 } from "zustand";
|
|
26049
26505
|
import { persist as persist4 } from "zustand/middleware";
|
|
26050
26506
|
import { jsx as jsx123, jsxs as jsxs112 } from "react/jsx-runtime";
|
|
@@ -26065,7 +26521,7 @@ function waitForStoreHydration() {
|
|
|
26065
26521
|
}
|
|
26066
26522
|
function SessionProvider({ children }) {
|
|
26067
26523
|
const config = useProviderConfig().config;
|
|
26068
|
-
return /* @__PURE__ */ jsxs112(
|
|
26524
|
+
return /* @__PURE__ */ jsxs112(Fragment44, { children: [
|
|
26069
26525
|
children,
|
|
26070
26526
|
config.current?.wallet?.enabled && /* @__PURE__ */ jsx123(WalletConnectHandler, {}),
|
|
26071
26527
|
config.current?.wallet?.enabled && (config.current?.wallet?.mode === "direct" || config.current?.wallet?.mode === "both") && /* @__PURE__ */ jsx123(DirectWalletHandler, {}),
|
|
@@ -27060,13 +27516,13 @@ async function clearLocalKeyshare(userId) {
|
|
|
27060
27516
|
console.log("[clearLocalKeyshare] Keyshares are now managed by secure iframe");
|
|
27061
27517
|
console.log("[clearLocalKeyshare] To clear keyshares, user must revoke authorization in iframe");
|
|
27062
27518
|
if (typeof window !== "undefined" && window.localStorage) {
|
|
27063
|
-
const
|
|
27519
|
+
const keys3 = [
|
|
27064
27520
|
`tss.${userId}.keyshare`,
|
|
27065
27521
|
`tss.${userId}.ownerAddress`,
|
|
27066
27522
|
`tss.${userId}.sessionId`,
|
|
27067
27523
|
...Object.keys(window.localStorage).filter((key) => key.startsWith(`tss.${userId}.dkg.`))
|
|
27068
27524
|
];
|
|
27069
|
-
|
|
27525
|
+
keys3.forEach((key) => window.localStorage.removeItem(key));
|
|
27070
27526
|
console.log("[clearLocalKeyshare] Cleared old localStorage keys for migration");
|
|
27071
27527
|
}
|
|
27072
27528
|
}
|
|
@@ -28783,7 +29239,7 @@ import { darkTheme, lightTheme, RainbowKitProvider as NativeRainbowKitProvider }
|
|
|
28783
29239
|
import { useMemo as useMemo16 } from "react";
|
|
28784
29240
|
import { WagmiProvider } from "wagmi";
|
|
28785
29241
|
import "@rainbow-me/rainbowkit/styles.css";
|
|
28786
|
-
import { Fragment as
|
|
29242
|
+
import { Fragment as Fragment45, jsx as jsx124 } from "react/jsx-runtime";
|
|
28787
29243
|
function RainbowKitProvider({ children }) {
|
|
28788
29244
|
const config = useProviderConfig().config;
|
|
28789
29245
|
const colorMode = useLayoutStore((st) => st.colorMode);
|
|
@@ -28815,7 +29271,7 @@ function RainbowKitProvider({ children }) {
|
|
|
28815
29271
|
radii: rainbowTheme.lightMode.radii
|
|
28816
29272
|
};
|
|
28817
29273
|
}, [colorMode]);
|
|
28818
|
-
if (!config.current?.wallet?.enabled) return /* @__PURE__ */ jsx124(
|
|
29274
|
+
if (!config.current?.wallet?.enabled) return /* @__PURE__ */ jsx124(Fragment45, { children });
|
|
28819
29275
|
return /* @__PURE__ */ jsx124(WagmiProvider, { config: rainbowConfig, children: /* @__PURE__ */ jsx124(NativeRainbowKitProvider, { theme: customTheme, modalSize: "compact", showRecentTransactions: true, children }) });
|
|
28820
29276
|
}
|
|
28821
29277
|
var init_RainbowKitContext = __esm({
|
|
@@ -28861,7 +29317,7 @@ import {
|
|
|
28861
29317
|
createContext,
|
|
28862
29318
|
useCallback as useCallback35,
|
|
28863
29319
|
useContext,
|
|
28864
|
-
useEffect as
|
|
29320
|
+
useEffect as useEffect55,
|
|
28865
29321
|
useMemo as useMemo17,
|
|
28866
29322
|
useRef as useRef21
|
|
28867
29323
|
} from "react";
|
|
@@ -28884,7 +29340,7 @@ function clearLegacyWagmiStorage() {
|
|
|
28884
29340
|
function Provider(props) {
|
|
28885
29341
|
const { children, projectId, initialConfig = {}, callbacks } = props;
|
|
28886
29342
|
const callbacksRef = useRef21(callbacks);
|
|
28887
|
-
|
|
29343
|
+
useEffect55(() => notifyNoProjetctId(projectId), [projectId]);
|
|
28888
29344
|
const config = useRef21(merge3({}, DEFAULT_PROVIDER_CONFIG, { projectId }, initialConfig));
|
|
28889
29345
|
const updateConfig = useCallback35((updates) => {
|
|
28890
29346
|
const prev = config.current;
|
|
@@ -28925,7 +29381,7 @@ function Provider(props) {
|
|
|
28925
29381
|
const next = updates ? { ...prev, ...updates } : void 0;
|
|
28926
29382
|
callbacksRef.current = next;
|
|
28927
29383
|
}, []);
|
|
28928
|
-
|
|
29384
|
+
useEffect55(() => {
|
|
28929
29385
|
if (typeof window === "undefined" || !projectId) return;
|
|
28930
29386
|
const mergedConfig = merge3(DEFAULT_PROVIDER_CONFIG, initialConfig);
|
|
28931
29387
|
updateConfig(mergedConfig);
|
|
@@ -28945,7 +29401,7 @@ function Provider(props) {
|
|
|
28945
29401
|
useSession.getState().setActiveChainId(mergedConfig.network.chainId);
|
|
28946
29402
|
}
|
|
28947
29403
|
}, [projectId, initialConfig]);
|
|
28948
|
-
|
|
29404
|
+
useEffect55(() => {
|
|
28949
29405
|
if (typeof window === "undefined" || !projectId) return;
|
|
28950
29406
|
try {
|
|
28951
29407
|
initSdkErrorTracking();
|
|
@@ -29034,8 +29490,8 @@ init_useLayoutStore();
|
|
|
29034
29490
|
init_pro_mode();
|
|
29035
29491
|
init_utils2();
|
|
29036
29492
|
import { Cloud as Cloud4, Laptop as Laptop2, Loader as Loader31, Shield as Shield3 } from "lucide-react";
|
|
29037
|
-
import { useEffect as
|
|
29038
|
-
import { Fragment as
|
|
29493
|
+
import { useEffect as useEffect56, useMemo as useMemo18 } from "react";
|
|
29494
|
+
import { Fragment as Fragment46, jsx as jsx127, jsxs as jsxs113 } from "react/jsx-runtime";
|
|
29039
29495
|
function getFormattedStatus(label, status, showStatus) {
|
|
29040
29496
|
const isStatus = showStatus && status && status !== "idle" && status !== "ready";
|
|
29041
29497
|
if (!isStatus) return label;
|
|
@@ -29054,7 +29510,7 @@ function ConnectWalletButton(props) {
|
|
|
29054
29510
|
const colorMode = useLayoutStore((st) => st.colorMode);
|
|
29055
29511
|
const { session, address, hasServerVault, isLoading, isIframeReady, status, setUsePaymaster } = useSession();
|
|
29056
29512
|
const connectButtonLabel = getFormattedStatus(label || "Connect", status, isIframeReady);
|
|
29057
|
-
|
|
29513
|
+
useEffect56(() => setUsePaymaster(usePaymaster), [setUsePaymaster, usePaymaster]);
|
|
29058
29514
|
const { data: profile, isLoading: isProfileLoading } = useUserProfile();
|
|
29059
29515
|
const displayName = profile?.nicknameDisplay || profile?.displayName || jwtTokenManager2.getDisplayName();
|
|
29060
29516
|
const indicators = useMemo18(() => {
|
|
@@ -29068,7 +29524,7 @@ function ConnectWalletButton(props) {
|
|
|
29068
29524
|
const isConnecting = connectButtonLabel !== label || isLoading;
|
|
29069
29525
|
return /* @__PURE__ */ jsx127("div", { "data-current-theme-mode": colorMode, className: cn("embarkai-ui-scope w-fit h-fit", className), children: !address ? (
|
|
29070
29526
|
/** external Buttons can be provided */
|
|
29071
|
-
/* @__PURE__ */ jsx127(
|
|
29527
|
+
/* @__PURE__ */ jsx127(Fragment46, { children: ConnectButton ? /* @__PURE__ */ jsxs113(
|
|
29072
29528
|
ConnectButton,
|
|
29073
29529
|
{
|
|
29074
29530
|
type: "button",
|
|
@@ -29700,13 +30156,13 @@ var Hash = ({
|
|
|
29700
30156
|
|
|
29701
30157
|
// src/internal/components/TransactionsMenu/TransactionsList.tsx
|
|
29702
30158
|
init_base2();
|
|
29703
|
-
import { useEffect as
|
|
30159
|
+
import { useEffect as useEffect58, useState as useState32 } from "react";
|
|
29704
30160
|
import { jsx as jsx133, jsxs as jsxs117 } from "react/jsx-runtime";
|
|
29705
30161
|
var TransactionsList = ({ address, itemsCount = 10 }) => {
|
|
29706
|
-
const [transactions, setTransactions] =
|
|
29707
|
-
const [loading, setLoading] =
|
|
29708
|
-
const [error, setError] =
|
|
29709
|
-
|
|
30162
|
+
const [transactions, setTransactions] = useState32([]);
|
|
30163
|
+
const [loading, setLoading] = useState32(true);
|
|
30164
|
+
const [error, setError] = useState32(null);
|
|
30165
|
+
useEffect58(() => {
|
|
29710
30166
|
const fetchTransactions2 = async () => {
|
|
29711
30167
|
try {
|
|
29712
30168
|
setLoading(true);
|
|
@@ -30056,7 +30512,7 @@ function useDirectWallet() {
|
|
|
30056
30512
|
|
|
30057
30513
|
// src/hooks/useSendDirectTransaction.ts
|
|
30058
30514
|
init_useExternalWalletStore();
|
|
30059
|
-
import { useCallback as useCallback40, useState as
|
|
30515
|
+
import { useCallback as useCallback40, useState as useState34 } from "react";
|
|
30060
30516
|
import { isAddress as isAddress3, parseEther as parseEther3 } from "viem";
|
|
30061
30517
|
import { useSendTransaction as useWagmiSendTransaction, useSwitchChain as useSwitchChain3 } from "wagmi";
|
|
30062
30518
|
function useSendDirectTransaction() {
|
|
@@ -30064,9 +30520,9 @@ function useSendDirectTransaction() {
|
|
|
30064
30520
|
const externalChainId = useExternalWalletStore((st) => st.externalChainId);
|
|
30065
30521
|
const { sendTransactionAsync } = useWagmiSendTransaction();
|
|
30066
30522
|
const { switchChainAsync } = useSwitchChain3();
|
|
30067
|
-
const [isPending, setIsPending] =
|
|
30068
|
-
const [error, setError] =
|
|
30069
|
-
const [txHash, setTxHash] =
|
|
30523
|
+
const [isPending, setIsPending] = useState34(false);
|
|
30524
|
+
const [error, setError] = useState34(null);
|
|
30525
|
+
const [txHash, setTxHash] = useState34(null);
|
|
30070
30526
|
const sendTransaction = useCallback40(
|
|
30071
30527
|
async (params) => {
|
|
30072
30528
|
if (!isConnected) {
|
|
@@ -30113,7 +30569,7 @@ function useSendDirectTransaction() {
|
|
|
30113
30569
|
init_SessionContext();
|
|
30114
30570
|
init_account2();
|
|
30115
30571
|
init_linkedProfiles();
|
|
30116
|
-
import { useCallback as useCallback41, useMemo as useMemo19, useState as
|
|
30572
|
+
import { useCallback as useCallback41, useMemo as useMemo19, useState as useState35 } from "react";
|
|
30117
30573
|
import { encodeFunctionData as encodeFunctionData3, isAddress as isAddress4, parseEther as parseEther4, parseUnits as parseUnits3 } from "viem";
|
|
30118
30574
|
var ERC20_TRANSFER_ABI2 = [
|
|
30119
30575
|
{
|
|
@@ -30129,9 +30585,9 @@ var ERC20_TRANSFER_ABI2 = [
|
|
|
30129
30585
|
function useTransferToLinkedWallet() {
|
|
30130
30586
|
const session = useSession((st) => st.session);
|
|
30131
30587
|
const { profiles } = useLinkedProfiles();
|
|
30132
|
-
const [isPending, setIsPending] =
|
|
30133
|
-
const [error, setError] =
|
|
30134
|
-
const [userOpHash, setUserOpHash] =
|
|
30588
|
+
const [isPending, setIsPending] = useState35(false);
|
|
30589
|
+
const [error, setError] = useState35(null);
|
|
30590
|
+
const [userOpHash, setUserOpHash] = useState35(null);
|
|
30135
30591
|
const linkedWallets = useMemo19(
|
|
30136
30592
|
() => (profiles || []).filter((p) => p.provider === "wallet" && p.externalId).map((p) => p.externalId),
|
|
30137
30593
|
[profiles]
|
|
@@ -30570,6 +31026,7 @@ function useSmartAccountTransactions() {
|
|
|
30570
31026
|
init_iframe_manager();
|
|
30571
31027
|
init_Onboarding();
|
|
30572
31028
|
init_BuyMenu2();
|
|
31029
|
+
init_SendMenu2();
|
|
30573
31030
|
|
|
30574
31031
|
// src/internal/assets/index.ts
|
|
30575
31032
|
init_networks2();
|
|
@@ -30601,6 +31058,7 @@ autorun();
|
|
|
30601
31058
|
export {
|
|
30602
31059
|
AccountAbstractionError,
|
|
30603
31060
|
Address,
|
|
31061
|
+
BRIDGE_MENU_TOUR,
|
|
30604
31062
|
BUY_MENU_BINANCE_TOUR,
|
|
30605
31063
|
ConnectWalletButton,
|
|
30606
31064
|
ErrorCodes,
|
|
@@ -30612,6 +31070,7 @@ export {
|
|
|
30612
31070
|
PASSPORT_TRANSLATIONS,
|
|
30613
31071
|
PageKey,
|
|
30614
31072
|
Provider,
|
|
31073
|
+
SEND_MENU_TOUR,
|
|
30615
31074
|
SessionExpiredError,
|
|
30616
31075
|
TOKENS_ICONS,
|
|
30617
31076
|
ThemeToggle,
|