@unifold/connect-react 0.1.81 → 0.1.82

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.
Files changed (3) hide show
  1. package/dist/index.js +737 -121
  2. package/dist/index.mjs +661 -45
  3. package/package.json +6 -6
package/dist/index.mjs CHANGED
@@ -1144,7 +1144,7 @@ ${new this._window.XMLSerializer().serializeToString(e3)}`;
1144
1144
  });
1145
1145
 
1146
1146
  // src/provider.tsx
1147
- import React45, { useState as useState51, useCallback as useCallback20, useMemo as useMemo26, useEffect as useEffect40 } from "react";
1147
+ import React45, { useState as useState52, useCallback as useCallback20, useMemo as useMemo27, useEffect as useEffect40 } from "react";
1148
1148
  import {
1149
1149
  UnifoldProvider as BaseUnifoldProvider,
1150
1150
  useUnifold as useBaseUnifold
@@ -6585,7 +6585,7 @@ function generateKSUID() {
6585
6585
  function generatePrefixedKSUID(prefix) {
6586
6586
  return `${prefix}_${generateKSUID()}`;
6587
6587
  }
6588
- var PACKAGE_VERSION = "0.1.81";
6588
+ var PACKAGE_VERSION = "0.1.82";
6589
6589
  var LIBRARY_NAME = "@unifold/analytics";
6590
6590
  var DEFAULT_DEDUP_MS = 500;
6591
6591
  var SESSION_PREFIX = "asess";
@@ -13003,11 +13003,20 @@ import {
13003
13003
  import { Fragment as Fragment21, jsx as jsx822, jsxs as jsxs71 } from "react/jsx-runtime";
13004
13004
  import { useState as useState50, useMemo as useMemo25 } from "react";
13005
13005
  import { jsx as jsx83, jsxs as jsxs72 } from "react/jsx-runtime";
13006
+ import { getIconUrlWithCdn as getIconUrlWithCdn2 } from "@unifold/core";
13007
+ import { jsx as jsx84 } from "react/jsx-runtime";
13008
+ import { useEffect as useEffect48, useMemo as useMemo26, useRef as useRef21, useState as useState51 } from "react";
13009
+ import { createPortal as createPortal2 } from "react-dom";
13010
+ import { Fragment as Fragment222, jsx as jsx85, jsxs as jsxs73 } from "react/jsx-runtime";
13011
+ import { Fragment as Fragment232, jsx as jsx86, jsxs as jsxs74 } from "react/jsx-runtime";
13006
13012
  var en_default = {
13007
13013
  common: {
13008
13014
  loading: "Loading...",
13009
13015
  search: "Search",
13010
13016
  close: "Close",
13017
+ noResults: "No matches found",
13018
+ selectCountry: "Select country",
13019
+ selectState: "Select state",
13011
13020
  review: "Review",
13012
13021
  tryAgain: "Try Again",
13013
13022
  somethingWentWrong: "Something went wrong",
@@ -13230,6 +13239,7 @@ var en_default = {
13230
13239
  not_opted_in: "Please make sure you opt-in {{token_symbol}}({{chain_name}}) before receiving funds",
13231
13240
  insufficient_balance: "Recipient account does not meet the minimum balance requirement",
13232
13241
  account_not_found: "Recipient account does not exist on {{chain_name}}",
13242
+ destination_tag_required: "This {{chain_name}} address requires a memo tag. Please provide your memo tag as well, in the format address:memotag",
13233
13243
  validation_error: "Unable to verify recipient address on {{chain_name}}"
13234
13244
  },
13235
13245
  defaultError: "The recipient address cannot receive funds for the selected token"
@@ -13808,12 +13818,18 @@ var en_default = {
13808
13818
  receiveChain: "Receive chain",
13809
13819
  recipientAddress: "Recipient address",
13810
13820
  recipientAddressPlaceholder: "Enter wallet address",
13821
+ recipientAddressPlaceholderXrpl: "Enter wallet address, or address:memotag",
13811
13822
  amount: "Amount",
13812
13823
  amountPlaceholder: "0.00",
13813
13824
  balance: "Balance",
13814
13825
  minimum: "min",
13815
13826
  withdraw: "Withdraw",
13816
13827
  invalidAddress: "Please enter a valid address",
13828
+ invalidXrplAddress: "Please enter a valid {{chain_name}} address. If your recipient requires a memo tag, please provide it as well, in the format address:memotag",
13829
+ memoTag: "Memo tag",
13830
+ memoTagPlaceholder: "e.g. 12345",
13831
+ memoTagRequiredHint: "This {{chain_name}} address requires a memo tag before it can receive funds",
13832
+ invalidMemoTag: "Memo tag must be a whole number between 0 and 4294967295",
13817
13833
  invalidAmount: "Please enter a valid amount",
13818
13834
  verifyingAddress: "Verifying address...",
13819
13835
  loading: "Loading...",
@@ -13861,6 +13877,9 @@ var zh_default = {
13861
13877
  loading: "\u52A0\u8F7D\u4E2D...",
13862
13878
  search: "\u641C\u7D22",
13863
13879
  close: "\u5173\u95ED",
13880
+ noResults: "\u6CA1\u6709\u5339\u914D\u7684\u7ED3\u679C",
13881
+ selectCountry: "\u9009\u62E9\u56FD\u5BB6",
13882
+ selectState: "\u9009\u62E9\u5DDE",
13864
13883
  review: "\u786E\u8BA4\u4FE1\u606F",
13865
13884
  tryAgain: "\u91CD\u8BD5",
13866
13885
  somethingWentWrong: "\u51FA\u73B0\u9519\u8BEF",
@@ -14083,6 +14102,7 @@ var zh_default = {
14083
14102
  not_opted_in: "\u8BF7\u5148\u5728 {{chain_name}} \u4E0A\u5F00\u901A {{token_symbol}}\uFF0C\u7136\u540E\u518D\u63A5\u6536\u8D44\u91D1",
14084
14103
  insufficient_balance: "\u6536\u6B3E\u8D26\u6237\u672A\u6EE1\u8DB3\u6700\u4F4E\u4F59\u989D\u8981\u6C42",
14085
14104
  account_not_found: "\u6536\u6B3E\u8D26\u6237\u5728 {{chain_name}} \u4E0A\u4E0D\u5B58\u5728",
14105
+ destination_tag_required: "\u8BE5 {{chain_name}} \u5730\u5740\u9700\u8981\u76EE\u6807\u6807\u7B7E\uFF08Destination Tag\uFF09\uFF0C\u8BF7\u4E00\u5E76\u586B\u5199\u6807\u7B7E\uFF0C\u683C\u5F0F\u4E3A \u5730\u5740:\u6807\u7B7E",
14086
14106
  validation_error: "\u65E0\u6CD5\u5728 {{chain_name}} \u4E0A\u9A8C\u8BC1\u6536\u6B3E\u5730\u5740"
14087
14107
  },
14088
14108
  defaultError: "\u8BE5\u6536\u6B3E\u5730\u5740\u65E0\u6CD5\u63A5\u6536\u6240\u9009\u4EE3\u5E01\u7684\u8D44\u91D1"
@@ -14661,12 +14681,18 @@ var zh_default = {
14661
14681
  receiveChain: "\u63A5\u6536\u7F51\u7EDC",
14662
14682
  recipientAddress: "\u6536\u6B3E\u5730\u5740",
14663
14683
  recipientAddressPlaceholder: "\u8F93\u5165\u94B1\u5305\u5730\u5740",
14684
+ recipientAddressPlaceholderXrpl: "\u8F93\u5165\u5730\u5740\uFF0C\u6216 \u5730\u5740:\u6807\u7B7E",
14664
14685
  amount: "\u91D1\u989D",
14665
14686
  amountPlaceholder: "0.00",
14666
14687
  balance: "\u4F59\u989D",
14667
14688
  minimum: "\u6700\u4F4E",
14668
14689
  withdraw: "\u63D0\u73B0",
14669
14690
  invalidAddress: "\u8BF7\u8F93\u5165\u6709\u6548\u5730\u5740",
14691
+ invalidXrplAddress: "\u8BF7\u8F93\u5165\u6709\u6548\u7684 {{chain_name}} \u5730\u5740\u3002\u5982\u679C\u6536\u6B3E\u65B9\u9700\u8981\u76EE\u6807\u6807\u7B7E\uFF0C\u8BF7\u4E00\u5E76\u586B\u5199\uFF0C\u683C\u5F0F\u4E3A \u5730\u5740:\u6807\u7B7E",
14692
+ memoTag: "\u76EE\u6807\u6807\u7B7E",
14693
+ memoTagPlaceholder: "\u4F8B\u5982 12345",
14694
+ memoTagRequiredHint: "\u8BE5 {{chain_name}} \u5730\u5740\u9700\u8981\u586B\u5199\u76EE\u6807\u6807\u7B7E\u624D\u80FD\u6536\u6B3E",
14695
+ invalidMemoTag: "\u76EE\u6807\u6807\u7B7E\u5FC5\u987B\u662F 0 \u5230 4294967295 \u4E4B\u95F4\u7684\u6574\u6570",
14670
14696
  invalidAmount: "\u8BF7\u8F93\u5165\u6709\u6548\u91D1\u989D",
14671
14697
  verifyingAddress: "\u6B63\u5728\u9A8C\u8BC1\u5730\u5740...",
14672
14698
  loading: "\u52A0\u8F7D\u4E2D...",
@@ -14714,6 +14740,9 @@ var zh_TW_default = {
14714
14740
  loading: "\u8F09\u5165\u4E2D...",
14715
14741
  search: "\u641C\u5C0B",
14716
14742
  close: "\u95DC\u9589",
14743
+ noResults: "\u6C92\u6709\u7B26\u5408\u7684\u7D50\u679C",
14744
+ selectCountry: "\u9078\u64C7\u570B\u5BB6",
14745
+ selectState: "\u9078\u64C7\u5DDE",
14717
14746
  review: "\u78BA\u8A8D\u8CC7\u8A0A",
14718
14747
  tryAgain: "\u91CD\u8A66",
14719
14748
  somethingWentWrong: "\u767C\u751F\u932F\u8AA4",
@@ -14936,6 +14965,7 @@ var zh_TW_default = {
14936
14965
  not_opted_in: "\u8ACB\u5148\u5728 {{chain_name}} \u4E0A\u958B\u901A {{token_symbol}}\uFF0C\u7136\u5F8C\u518D\u63A5\u6536\u8CC7\u91D1",
14937
14966
  insufficient_balance: "\u6536\u6B3E\u5E33\u6236\u672A\u9054\u6700\u4F4E\u9918\u984D\u8981\u6C42",
14938
14967
  account_not_found: "\u6536\u6B3E\u5E33\u6236\u5728 {{chain_name}} \u4E0A\u4E0D\u5B58\u5728",
14968
+ destination_tag_required: "\u8A72 {{chain_name}} \u5730\u5740\u9700\u8981\u76EE\u7684\u5730\u6A19\u7C64\uFF08Destination Tag\uFF09\uFF0C\u8ACB\u4E00\u4F75\u586B\u5BEB\u6A19\u7C64\uFF0C\u683C\u5F0F\u70BA \u5730\u5740:\u6A19\u7C64",
14939
14969
  validation_error: "\u7121\u6CD5\u5728 {{chain_name}} \u4E0A\u9A57\u8B49\u6536\u6B3E\u5730\u5740"
14940
14970
  },
14941
14971
  defaultError: "\u8A72\u6536\u6B3E\u5730\u5740\u7121\u6CD5\u63A5\u6536\u6240\u9078\u4EE3\u5E63\u7684\u8CC7\u91D1"
@@ -15514,12 +15544,18 @@ var zh_TW_default = {
15514
15544
  receiveChain: "\u63A5\u6536\u7DB2\u8DEF",
15515
15545
  recipientAddress: "\u6536\u6B3E\u5730\u5740",
15516
15546
  recipientAddressPlaceholder: "\u8F38\u5165\u9322\u5305\u5730\u5740",
15547
+ recipientAddressPlaceholderXrpl: "\u8F38\u5165\u5730\u5740\uFF0C\u6216 \u5730\u5740:\u6A19\u7C64",
15517
15548
  amount: "\u91D1\u984D",
15518
15549
  amountPlaceholder: "0.00",
15519
15550
  balance: "\u9918\u984D",
15520
15551
  minimum: "\u6700\u4F4E",
15521
15552
  withdraw: "\u63D0\u9818",
15522
15553
  invalidAddress: "\u8ACB\u8F38\u5165\u6709\u6548\u5730\u5740",
15554
+ invalidXrplAddress: "\u8ACB\u8F38\u5165\u6709\u6548\u7684 {{chain_name}} \u5730\u5740\u3002\u82E5\u6536\u6B3E\u65B9\u9700\u8981\u76EE\u7684\u5730\u6A19\u7C64\uFF0C\u8ACB\u4E00\u4F75\u586B\u5BEB\uFF0C\u683C\u5F0F\u70BA \u5730\u5740:\u6A19\u7C64",
15555
+ memoTag: "\u76EE\u7684\u5730\u6A19\u7C64",
15556
+ memoTagPlaceholder: "\u4F8B\u5982 12345",
15557
+ memoTagRequiredHint: "\u8A72 {{chain_name}} \u5730\u5740\u9700\u8981\u586B\u5BEB\u76EE\u7684\u5730\u6A19\u7C64\u624D\u80FD\u6536\u6B3E",
15558
+ invalidMemoTag: "\u76EE\u7684\u5730\u6A19\u7C64\u5FC5\u9808\u662F 0 \u5230 4294967295 \u4E4B\u9593\u7684\u6574\u6578",
15523
15559
  invalidAmount: "\u8ACB\u8F38\u5165\u6709\u6548\u91D1\u984D",
15524
15560
  verifyingAddress: "\u6B63\u5728\u9A57\u8B49\u5730\u5740...",
15525
15561
  loading: "\u8F09\u5165\u4E2D...",
@@ -15567,6 +15603,9 @@ var fr_default = {
15567
15603
  loading: "Chargement...",
15568
15604
  search: "Rechercher",
15569
15605
  close: "Fermer",
15606
+ noResults: "Aucun r\xE9sultat",
15607
+ selectCountry: "S\xE9lectionner un pays",
15608
+ selectState: "S\xE9lectionner un \xC9tat",
15570
15609
  review: "V\xE9rifier",
15571
15610
  tryAgain: "R\xE9essayer",
15572
15611
  somethingWentWrong: "Une erreur s'est produite",
@@ -15789,6 +15828,7 @@ var fr_default = {
15789
15828
  not_opted_in: "Veuillez d'abord activer {{token_symbol}} ({{chain_name}}) avant de recevoir des fonds",
15790
15829
  insufficient_balance: "Le compte destinataire ne respecte pas le solde minimum requis",
15791
15830
  account_not_found: "Le compte destinataire n'existe pas sur {{chain_name}}",
15831
+ destination_tag_required: "Cette adresse {{chain_name}} n\xE9cessite un tag de destination. Veuillez \xE9galement indiquer votre tag, au format adresse:tag",
15792
15832
  validation_error: "Impossible de v\xE9rifier l'adresse du destinataire sur {{chain_name}}"
15793
15833
  },
15794
15834
  defaultError: "L'adresse du destinataire ne peut pas recevoir de fonds pour le jeton s\xE9lectionn\xE9"
@@ -16367,12 +16407,18 @@ var fr_default = {
16367
16407
  receiveChain: "R\xE9seau de r\xE9ception",
16368
16408
  recipientAddress: "Adresse du destinataire",
16369
16409
  recipientAddressPlaceholder: "Saisir l'adresse du portefeuille",
16410
+ recipientAddressPlaceholderXrpl: "Saisir l'adresse, ou adresse:tag",
16370
16411
  amount: "Montant",
16371
16412
  amountPlaceholder: "0,00",
16372
16413
  balance: "Solde",
16373
16414
  minimum: "min.",
16374
16415
  withdraw: "Retirer",
16375
16416
  invalidAddress: "Veuillez saisir une adresse valide",
16417
+ invalidXrplAddress: "Veuillez saisir une adresse {{chain_name}} valide. Si votre destinataire n\xE9cessite un tag de destination, indiquez-le \xE9galement, au format adresse:tag",
16418
+ memoTag: "Tag de destination",
16419
+ memoTagPlaceholder: "ex. 12345",
16420
+ memoTagRequiredHint: "Cette adresse {{chain_name}} n\xE9cessite un tag de destination pour recevoir des fonds",
16421
+ invalidMemoTag: "Le tag de destination doit \xEAtre un nombre entier entre 0 et 4294967295",
16376
16422
  invalidAmount: "Veuillez saisir un montant valide",
16377
16423
  verifyingAddress: "V\xE9rification de l'adresse...",
16378
16424
  loading: "Chargement...",
@@ -16420,6 +16466,9 @@ var th_default = {
16420
16466
  loading: "\u0E01\u0E33\u0E25\u0E31\u0E07\u0E42\u0E2B\u0E25\u0E14...",
16421
16467
  search: "\u0E04\u0E49\u0E19\u0E2B\u0E32",
16422
16468
  close: "\u0E1B\u0E34\u0E14",
16469
+ noResults: "\u0E44\u0E21\u0E48\u0E1E\u0E1A\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23\u0E17\u0E35\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E19",
16470
+ selectCountry: "\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28",
16471
+ selectState: "\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E23\u0E31\u0E10",
16423
16472
  review: "\u0E15\u0E23\u0E27\u0E08\u0E2A\u0E2D\u0E1A",
16424
16473
  tryAgain: "\u0E25\u0E2D\u0E07\u0E2D\u0E35\u0E01\u0E04\u0E23\u0E31\u0E49\u0E07",
16425
16474
  somethingWentWrong: "\u0E40\u0E01\u0E34\u0E14\u0E02\u0E49\u0E2D\u0E1C\u0E34\u0E14\u0E1E\u0E25\u0E32\u0E14",
@@ -16642,6 +16691,7 @@ var th_default = {
16642
16691
  not_opted_in: "\u0E42\u0E1B\u0E23\u0E14\u0E40\u0E1B\u0E34\u0E14\u0E43\u0E0A\u0E49 {{token_symbol}} ({{chain_name}}) \u0E01\u0E48\u0E2D\u0E19\u0E23\u0E31\u0E1A\u0E40\u0E07\u0E34\u0E19",
16643
16692
  insufficient_balance: "\u0E1A\u0E31\u0E0D\u0E0A\u0E35\u0E1C\u0E39\u0E49\u0E23\u0E31\u0E1A\u0E44\u0E21\u0E48\u0E21\u0E35\u0E22\u0E2D\u0E14\u0E04\u0E07\u0E40\u0E2B\u0E25\u0E37\u0E2D\u0E02\u0E31\u0E49\u0E19\u0E15\u0E48\u0E33\u0E15\u0E32\u0E21\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14",
16644
16693
  account_not_found: "\u0E44\u0E21\u0E48\u0E21\u0E35\u0E1A\u0E31\u0E0D\u0E0A\u0E35\u0E1C\u0E39\u0E49\u0E23\u0E31\u0E1A\u0E1A\u0E19 {{chain_name}}",
16694
+ destination_tag_required: "\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 {{chain_name}} \u0E19\u0E35\u0E49\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 destination tag \u0E01\u0E23\u0E38\u0E13\u0E32\u0E23\u0E30\u0E1A\u0E38\u0E41\u0E17\u0E47\u0E01\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13\u0E14\u0E49\u0E27\u0E22 \u0E43\u0E19\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A \u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48:\u0E41\u0E17\u0E47\u0E01",
16645
16695
  validation_error: "\u0E44\u0E21\u0E48\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E15\u0E23\u0E27\u0E08\u0E2A\u0E2D\u0E1A\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E1C\u0E39\u0E49\u0E23\u0E31\u0E1A\u0E1A\u0E19 {{chain_name}} \u0E44\u0E14\u0E49"
16646
16696
  },
16647
16697
  defaultError: "\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E1C\u0E39\u0E49\u0E23\u0E31\u0E1A\u0E44\u0E21\u0E48\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E23\u0E31\u0E1A\u0E40\u0E07\u0E34\u0E19\u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A\u0E42\u0E17\u0E40\u0E04\u0E19\u0E17\u0E35\u0E48\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E14\u0E49"
@@ -17220,12 +17270,18 @@ var th_default = {
17220
17270
  receiveChain: "\u0E40\u0E04\u0E23\u0E37\u0E2D\u0E02\u0E48\u0E32\u0E22\u0E17\u0E35\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A",
17221
17271
  recipientAddress: "\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E1C\u0E39\u0E49\u0E23\u0E31\u0E1A",
17222
17272
  recipientAddressPlaceholder: "\u0E01\u0E23\u0E2D\u0E01\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E01\u0E23\u0E30\u0E40\u0E1B\u0E4B\u0E32\u0E40\u0E07\u0E34\u0E19",
17273
+ recipientAddressPlaceholderXrpl: "\u0E01\u0E23\u0E2D\u0E01\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 \u0E2B\u0E23\u0E37\u0E2D \u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48:\u0E41\u0E17\u0E47\u0E01",
17223
17274
  amount: "\u0E08\u0E33\u0E19\u0E27\u0E19",
17224
17275
  amountPlaceholder: "0.00",
17225
17276
  balance: "\u0E22\u0E2D\u0E14\u0E04\u0E07\u0E40\u0E2B\u0E25\u0E37\u0E2D",
17226
17277
  minimum: "\u0E02\u0E31\u0E49\u0E19\u0E15\u0E48\u0E33",
17227
17278
  withdraw: "\u0E16\u0E2D\u0E19",
17228
17279
  invalidAddress: "\u0E42\u0E1B\u0E23\u0E14\u0E01\u0E23\u0E2D\u0E01\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E17\u0E35\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07",
17280
+ invalidXrplAddress: "\u0E42\u0E1B\u0E23\u0E14\u0E01\u0E23\u0E2D\u0E01\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 {{chain_name}} \u0E17\u0E35\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07 \u0E2B\u0E32\u0E01\u0E1C\u0E39\u0E49\u0E23\u0E31\u0E1A\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E0A\u0E49 destination tag \u0E01\u0E23\u0E38\u0E13\u0E32\u0E23\u0E30\u0E1A\u0E38\u0E14\u0E49\u0E27\u0E22\u0E43\u0E19\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A \u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48:\u0E41\u0E17\u0E47\u0E01",
17281
+ memoTag: "Destination tag",
17282
+ memoTagPlaceholder: "\u0E40\u0E0A\u0E48\u0E19 12345",
17283
+ memoTagRequiredHint: "\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 {{chain_name}} \u0E19\u0E35\u0E49\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 destination tag \u0E08\u0E36\u0E07\u0E08\u0E30\u0E23\u0E31\u0E1A\u0E40\u0E07\u0E34\u0E19\u0E44\u0E14\u0E49",
17284
+ invalidMemoTag: "Destination tag \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E40\u0E15\u0E47\u0E21\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07 0 \u0E16\u0E36\u0E07 4294967295",
17229
17285
  invalidAmount: "\u0E42\u0E1B\u0E23\u0E14\u0E01\u0E23\u0E2D\u0E01\u0E08\u0E33\u0E19\u0E27\u0E19\u0E17\u0E35\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07",
17230
17286
  verifyingAddress: "\u0E01\u0E33\u0E25\u0E31\u0E07\u0E15\u0E23\u0E27\u0E08\u0E2A\u0E2D\u0E1A\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48...",
17231
17287
  loading: "\u0E01\u0E33\u0E25\u0E31\u0E07\u0E42\u0E2B\u0E25\u0E14...",
@@ -17273,6 +17329,9 @@ var ja_default = {
17273
17329
  loading: "\u8AAD\u307F\u8FBC\u307F\u4E2D...",
17274
17330
  search: "\u691C\u7D22",
17275
17331
  close: "\u9589\u3058\u308B",
17332
+ noResults: "\u4E00\u81F4\u3059\u308B\u9805\u76EE\u304C\u3042\u308A\u307E\u305B\u3093",
17333
+ selectCountry: "\u56FD\u3092\u9078\u629E",
17334
+ selectState: "\u5DDE\u3092\u9078\u629E",
17276
17335
  review: "\u78BA\u8A8D",
17277
17336
  tryAgain: "\u518D\u8A66\u884C",
17278
17337
  somethingWentWrong: "\u554F\u984C\u304C\u767A\u751F\u3057\u307E\u3057\u305F",
@@ -17495,6 +17554,7 @@ var ja_default = {
17495
17554
  not_opted_in: "\u8CC7\u91D1\u3092\u53D7\u3051\u53D6\u308B\u524D\u306B\u3001{{chain_name}}\u3067{{token_symbol}}\u3092\u30AA\u30D7\u30C8\u30A4\u30F3\u3057\u3066\u304F\u3060\u3055\u3044",
17496
17555
  insufficient_balance: "\u53D7\u53D6\u53E3\u5EA7\u304C\u6700\u4F4E\u6B8B\u9AD8\u306E\u8981\u4EF6\u3092\u6E80\u305F\u3057\u3066\u3044\u307E\u305B\u3093",
17497
17556
  account_not_found: "{{chain_name}}\u4E0A\u306B\u53D7\u53D6\u53E3\u5EA7\u304C\u5B58\u5728\u3057\u307E\u305B\u3093",
17557
+ destination_tag_required: "\u3053\u306E{{chain_name}}\u30A2\u30C9\u30EC\u30B9\u306B\u306F\u5B9B\u5148\u30BF\u30B0\u304C\u5FC5\u8981\u3067\u3059\u3002\u5B9B\u5148\u30BF\u30B0\u3082\u300C\u30A2\u30C9\u30EC\u30B9:\u30BF\u30B0\u300D\u306E\u5F62\u5F0F\u3067\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",
17498
17558
  validation_error: "{{chain_name}}\u4E0A\u306E\u53D7\u53D6\u30A2\u30C9\u30EC\u30B9\u3092\u78BA\u8A8D\u3067\u304D\u307E\u305B\u3093"
17499
17559
  },
17500
17560
  defaultError: "\u9078\u629E\u3057\u305F\u30C8\u30FC\u30AF\u30F3\u3067\u306F\u3001\u3053\u306E\u53D7\u53D6\u30A2\u30C9\u30EC\u30B9\u306B\u8CC7\u91D1\u3092\u9001\u308C\u307E\u305B\u3093"
@@ -18073,12 +18133,18 @@ var ja_default = {
18073
18133
  receiveChain: "\u53D7\u53D6\u30C1\u30A7\u30FC\u30F3",
18074
18134
  recipientAddress: "\u53D7\u53D6\u30A2\u30C9\u30EC\u30B9",
18075
18135
  recipientAddressPlaceholder: "\u30A6\u30A9\u30EC\u30C3\u30C8\u30A2\u30C9\u30EC\u30B9\u3092\u5165\u529B",
18136
+ recipientAddressPlaceholderXrpl: "\u30A2\u30C9\u30EC\u30B9\u3001\u307E\u305F\u306F \u30A2\u30C9\u30EC\u30B9:\u30BF\u30B0 \u3092\u5165\u529B",
18076
18137
  amount: "\u91D1\u984D",
18077
18138
  amountPlaceholder: "0.00",
18078
18139
  balance: "\u6B8B\u9AD8",
18079
18140
  minimum: "\u6700\u4F4E",
18080
18141
  withdraw: "\u51FA\u91D1",
18081
18142
  invalidAddress: "\u6709\u52B9\u306A\u30A2\u30C9\u30EC\u30B9\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",
18143
+ invalidXrplAddress: "\u6709\u52B9\u306A{{chain_name}}\u30A2\u30C9\u30EC\u30B9\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044\u3002\u53D7\u53D6\u5148\u3067\u5B9B\u5148\u30BF\u30B0\u304C\u5FC5\u8981\u306A\u5834\u5408\u306F\u3001\u300C\u30A2\u30C9\u30EC\u30B9:\u30BF\u30B0\u300D\u306E\u5F62\u5F0F\u3067\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",
18144
+ memoTag: "\u5B9B\u5148\u30BF\u30B0",
18145
+ memoTagPlaceholder: "\u4F8B: 12345",
18146
+ memoTagRequiredHint: "\u3053\u306E{{chain_name}}\u30A2\u30C9\u30EC\u30B9\u306F\u3001\u8CC7\u91D1\u3092\u53D7\u3051\u53D6\u308B\u305F\u3081\u306B\u5B9B\u5148\u30BF\u30B0\u304C\u5FC5\u8981\u3067\u3059",
18147
+ invalidMemoTag: "\u5B9B\u5148\u30BF\u30B0\u306F 0\u301C4294967295 \u306E\u6574\u6570\u3067\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",
18082
18148
  invalidAmount: "\u6709\u52B9\u306A\u91D1\u984D\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",
18083
18149
  verifyingAddress: "\u30A2\u30C9\u30EC\u30B9\u3092\u78BA\u8A8D\u3057\u3066\u3044\u307E\u3059...",
18084
18150
  loading: "\u8AAD\u307F\u8FBC\u307F\u4E2D...",
@@ -18126,6 +18192,9 @@ var ko_default = {
18126
18192
  loading: "\uB85C\uB529 \uC911...",
18127
18193
  search: "\uAC80\uC0C9",
18128
18194
  close: "\uB2EB\uAE30",
18195
+ noResults: "\uC77C\uCE58\uD558\uB294 \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4",
18196
+ selectCountry: "\uAD6D\uAC00 \uC120\uD0DD",
18197
+ selectState: "\uC8FC \uC120\uD0DD",
18129
18198
  review: "\uD655\uC778",
18130
18199
  tryAgain: "\uB2E4\uC2DC \uC2DC\uB3C4",
18131
18200
  somethingWentWrong: "\uBB38\uC81C\uAC00 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4",
@@ -18348,6 +18417,7 @@ var ko_default = {
18348
18417
  not_opted_in: "\uC790\uAE08\uC744 \uBC1B\uAE30 \uC804\uC5D0 {{chain_name}}\uC5D0\uC11C {{token_symbol}}\uC744(\uB97C) \uC635\uD2B8\uC778\uD558\uC138\uC694",
18349
18418
  insufficient_balance: "\uBC1B\uB294 \uACC4\uC815\uC774 \uCD5C\uC18C \uC794\uC561 \uC694\uAC74\uC744 \uCDA9\uC871\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4",
18350
18419
  account_not_found: "{{chain_name}}\uC5D0 \uBC1B\uB294 \uACC4\uC815\uC774 \uC5C6\uC2B5\uB2C8\uB2E4",
18420
+ destination_tag_required: "\uC774 {{chain_name}} \uC8FC\uC18C\uC5D0\uB294 \uB370\uC2A4\uD2F0\uB124\uC774\uC158 \uD0DC\uADF8\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4. \uD0DC\uADF8\uB3C4 \uD568\uAED8 \uC8FC\uC18C:\uD0DC\uADF8 \uD615\uC2DD\uC73C\uB85C \uC785\uB825\uD558\uC138\uC694",
18351
18421
  validation_error: "{{chain_name}}\uC5D0\uC11C \uBC1B\uB294 \uC8FC\uC18C\uB97C \uD655\uC778\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4"
18352
18422
  },
18353
18423
  defaultError: "\uC120\uD0DD\uD55C \uD1A0\uD070\uC73C\uB85C\uB294 \uC774 \uBC1B\uB294 \uC8FC\uC18C\uC5D0 \uC790\uAE08\uC744 \uBCF4\uB0BC \uC218 \uC5C6\uC2B5\uB2C8\uB2E4"
@@ -18926,12 +18996,18 @@ var ko_default = {
18926
18996
  receiveChain: "\uBC1B\uC744 \uCCB4\uC778",
18927
18997
  recipientAddress: "\uBC1B\uB294 \uC8FC\uC18C",
18928
18998
  recipientAddressPlaceholder: "\uC9C0\uAC11 \uC8FC\uC18C\uB97C \uC785\uB825\uD558\uC138\uC694",
18999
+ recipientAddressPlaceholderXrpl: "\uC8FC\uC18C \uB610\uB294 \uC8FC\uC18C:\uD0DC\uADF8 \uB97C \uC785\uB825\uD558\uC138\uC694",
18929
19000
  amount: "\uAE08\uC561",
18930
19001
  amountPlaceholder: "0.00",
18931
19002
  balance: "\uC794\uC561",
18932
19003
  minimum: "\uCD5C\uC18C",
18933
19004
  withdraw: "\uCD9C\uAE08",
18934
19005
  invalidAddress: "\uC720\uD6A8\uD55C \uC8FC\uC18C\uB97C \uC785\uB825\uD574 \uC8FC\uC138\uC694",
19006
+ invalidXrplAddress: "\uC720\uD6A8\uD55C {{chain_name}} \uC8FC\uC18C\uB97C \uC785\uB825\uD574 \uC8FC\uC138\uC694. \uC218\uCDE8\uC778\uC774 \uB370\uC2A4\uD2F0\uB124\uC774\uC158 \uD0DC\uADF8\uB97C \uC694\uAD6C\uD558\uB294 \uACBD\uC6B0 \uC8FC\uC18C:\uD0DC\uADF8 \uD615\uC2DD\uC73C\uB85C \uD568\uAED8 \uC785\uB825\uD558\uC138\uC694",
19007
+ memoTag: "\uB370\uC2A4\uD2F0\uB124\uC774\uC158 \uD0DC\uADF8",
19008
+ memoTagPlaceholder: "\uC608: 12345",
19009
+ memoTagRequiredHint: "\uC774 {{chain_name}} \uC8FC\uC18C\uB294 \uC790\uAE08\uC744 \uBC1B\uAE30 \uC704\uD574 \uB370\uC2A4\uD2F0\uB124\uC774\uC158 \uD0DC\uADF8\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4",
19010
+ invalidMemoTag: "\uB370\uC2A4\uD2F0\uB124\uC774\uC158 \uD0DC\uADF8\uB294 0\uC5D0\uC11C 4294967295 \uC0AC\uC774\uC758 \uC815\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4",
18935
19011
  invalidAmount: "\uC720\uD6A8\uD55C \uAE08\uC561\uC744 \uC785\uB825\uD574 \uC8FC\uC138\uC694",
18936
19012
  verifyingAddress: "\uC8FC\uC18C\uB97C \uD655\uC778\uD558\uB294 \uC911...",
18937
19013
  loading: "\uB85C\uB529 \uC911...",
@@ -21784,6 +21860,17 @@ function DepositPollingToasts({
21784
21860
  }
21785
21861
  );
21786
21862
  }
21863
+ var initialCardOnrampSessionState = {
21864
+ active: null,
21865
+ started: false
21866
+ };
21867
+ function startCardOnrampSession(session) {
21868
+ return { active: session, started: true };
21869
+ }
21870
+ function cardOnrampSessionForView(state, view) {
21871
+ if (view === "review" || state.active === null) return state;
21872
+ return { active: null, started: state.started };
21873
+ }
21787
21874
  function formatFiatAmount(value, symbol) {
21788
21875
  return `${symbol}${value.toLocaleString(void 0, {
21789
21876
  minimumFractionDigits: 2,
@@ -21862,10 +21949,13 @@ function BuyWithCard({
21862
21949
  const [defaultToken, setDefaultToken] = useState112(null);
21863
21950
  const [defaultTokenLoading, setDefaultTokenLoading] = useState112(false);
21864
21951
  const { userIpInfo, isLoading: isLoadingIp } = useUserIp();
21865
- const [onrampSession, setOnrampSession] = useState112(null);
21952
+ const [onrampSession, setOnrampSession] = useState112(initialCardOnrampSessionState);
21866
21953
  const currentView = externalView ?? internalView;
21867
21954
  const showQuotesView = currentView === "quotes";
21868
21955
  const showReviewView = currentView === "review";
21956
+ useEffect82(() => {
21957
+ setOnrampSession((prev) => cardOnrampSessionForView(prev, currentView));
21958
+ }, [currentView]);
21869
21959
  useEffect82(() => {
21870
21960
  if (externalView) {
21871
21961
  setInternalView(externalView);
@@ -22017,7 +22107,7 @@ function BuyWithCard({
22017
22107
  const { executions, isPolling } = useDepositPolling({
22018
22108
  userId,
22019
22109
  publishableKey,
22020
- enabled: !!onrampSession,
22110
+ enabled: onrampSession.started,
22021
22111
  depositWalletId,
22022
22112
  onDepositSuccess,
22023
22113
  onDepositError
@@ -22310,13 +22400,15 @@ function BuyWithCard({
22310
22400
  ...isDestinationMode ? { destination_amount: destinationAmount } : { source_amount: amount }
22311
22401
  };
22312
22402
  const sessionStartUrl = getOnrampSessionStartUrl(sessionRequest, publishableKey);
22313
- setOnrampSession({
22314
- provider: selectedProvider,
22315
- sourceCurrency: currency,
22316
- sourceAmount: amount,
22317
- sessionUrl: sessionStartUrl,
22318
- externalId
22319
- });
22403
+ setOnrampSession(
22404
+ startCardOnrampSession({
22405
+ provider: selectedProvider,
22406
+ sourceCurrency: currency,
22407
+ sourceAmount: amount,
22408
+ sessionUrl: sessionStartUrl,
22409
+ externalId
22410
+ })
22411
+ );
22320
22412
  track("flow_started", {
22321
22413
  method: "card",
22322
22414
  flow_type: "deposit",
@@ -22772,8 +22864,8 @@ function BuyWithCard({
22772
22864
  onToggleDetails: () => setShowReviewDetails((prev) => !prev),
22773
22865
  onContinue: handleStartOnramp,
22774
22866
  continueLabel: strings.common.confirm,
22775
- continueDisabled: !selectedProvider || !!onrampSession,
22776
- checking: !!onrampSession,
22867
+ continueDisabled: !selectedProvider || !!onrampSession.active,
22868
+ checking: !!onrampSession.active,
22777
22869
  disclaimer: strings.common.intentAddressDisclaimer
22778
22870
  }
22779
22871
  )
@@ -31484,6 +31576,9 @@ function useStripeOnramp(stripePublishableKey, isDark = false) {
31484
31576
  }, []);
31485
31577
  return { coordinator, isLoading, error, initialize };
31486
31578
  }
31579
+ function normalizeStripeStateCode(raw) {
31580
+ return raw.replace(/[^a-zA-Z]/g, "").slice(0, 2).toUpperCase();
31581
+ }
31487
31582
  var STORAGE_PREFIX = "unifold:stripe-link:session";
31488
31583
  function storageKey(externalUserId) {
31489
31584
  return `${STORAGE_PREFIX}:${externalUserId}`;
@@ -32550,7 +32645,7 @@ function PayWithStripeLink({
32550
32645
  setKycFormMode("name");
32551
32646
  return;
32552
32647
  }
32553
- if (!kycForm.addressLine1.trim() || !kycForm.addressCity.trim() || !kycForm.addressState.trim() || !kycForm.addressPostalCode.trim()) {
32648
+ if (!kycForm.addressLine1.trim() || !kycForm.addressCity.trim() || normalizeStripeStateCode(kycForm.addressState).length !== 2 || !kycForm.addressPostalCode.trim()) {
32554
32649
  setError(t.formErrors.enterFullAddress);
32555
32650
  return;
32556
32651
  }
@@ -32561,7 +32656,8 @@ function PayWithStripeLink({
32561
32656
  line1: kycForm.addressLine1,
32562
32657
  ...kycForm.addressLine2.trim() && { line2: kycForm.addressLine2 },
32563
32658
  city: kycForm.addressCity,
32564
- state: kycForm.addressState,
32659
+ // Stripe requires a 2-letter uppercase code for US/CA (`TX`, not `Tx`).
32660
+ state: normalizeStripeStateCode(kycForm.addressState),
32565
32661
  postal_code: kycForm.addressPostalCode,
32566
32662
  country: kycForm.addressCountry
32567
32663
  }
@@ -33825,9 +33921,14 @@ function PayWithStripeLink({
33825
33921
  ...NO_AUTOFILL,
33826
33922
  type: "text",
33827
33923
  value: kycForm.addressState,
33828
- onChange: (e) => setKycForm((f) => ({ ...f, addressState: e.target.value })),
33924
+ onChange: (e) => setKycForm((f) => ({
33925
+ ...f,
33926
+ addressState: normalizeStripeStateCode(e.target.value)
33927
+ })),
33829
33928
  placeholder: "CA",
33830
33929
  maxLength: 2,
33930
+ autoCapitalize: "characters",
33931
+ spellCheck: false,
33831
33932
  className: "uf-w-full uf-py-2.5 uf-px-3 uf-bg-transparent uf-outline-none uf-text-sm",
33832
33933
  style: inputStyle
33833
33934
  }
@@ -33933,7 +34034,7 @@ function PayWithStripeLink({
33933
34034
  DepositFooterButton,
33934
34035
  {
33935
34036
  onClick: kycFormMode === "name" ? handleNameNext : handleKycSubmit,
33936
- disabled: loading || (kycFormMode === "name" ? !kycForm.givenName || !kycForm.surname : kycFormMode === "address" ? !kycForm.addressLine1 || !kycForm.addressCity || !kycForm.addressState || !kycForm.addressPostalCode : !kycForm.ssn || !kycForm.dob.day || !kycForm.dob.month || !kycForm.dob.year),
34037
+ disabled: loading || (kycFormMode === "name" ? !kycForm.givenName || !kycForm.surname : kycFormMode === "address" ? !kycForm.addressLine1 || !kycForm.addressCity || kycForm.addressState.length !== 2 || !kycForm.addressPostalCode : !kycForm.ssn || !kycForm.dob.day || !kycForm.dob.month || !kycForm.dob.year),
33937
34038
  loading,
33938
34039
  className: "uf-flex-1",
33939
34040
  children: loading ? t.submitting : strings.common.review
@@ -47454,6 +47555,30 @@ function useVerifyRecipientAddress(params) {
47454
47555
  refetchOnWindowFocus: false
47455
47556
  });
47456
47557
  }
47558
+ var XRPL_BASE58 = "rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz";
47559
+ var CLASSIC_ADDRESS = new RegExp(`^r[${XRPL_BASE58}]{24,34}$`);
47560
+ var X_ADDRESS = new RegExp(`^[XT][${XRPL_BASE58}]{40,50}$`);
47561
+ var MAX_DESTINATION_TAG = 4294967295;
47562
+ function isXrplRecipientShapeValid(input) {
47563
+ const trimmed = input.trim();
47564
+ if (trimmed.length === 0) {
47565
+ return false;
47566
+ }
47567
+ const separatorIndex = trimmed.indexOf(":");
47568
+ if (separatorIndex === -1) {
47569
+ return CLASSIC_ADDRESS.test(trimmed) || X_ADDRESS.test(trimmed);
47570
+ }
47571
+ const address = trimmed.slice(0, separatorIndex);
47572
+ const tag = trimmed.slice(separatorIndex + 1);
47573
+ return isDestinationTagValid(tag) && (CLASSIC_ADDRESS.test(address) || X_ADDRESS.test(address));
47574
+ }
47575
+ function isDestinationTagValid(tag) {
47576
+ if (!/^\d+$/.test(tag)) {
47577
+ return false;
47578
+ }
47579
+ const parsed = Number(tag);
47580
+ return parsed <= MAX_DESTINATION_TAG;
47581
+ }
47457
47582
  function useGetDepositAddress(params) {
47458
47583
  const {
47459
47584
  userId,
@@ -47616,6 +47741,8 @@ function WithdrawForm({
47616
47741
  const t = strings.withdrawModal;
47617
47742
  const tCrypto = strings.transferCrypto;
47618
47743
  const [recipientAddress, setRecipientAddress] = useState47(recipientAddressProp || "");
47744
+ const [memoTag, setMemoTag] = useState47("");
47745
+ const [memoTagRequiredFor, setMemoTagRequiredFor] = useState47(null);
47619
47746
  const [amount, setAmount] = useState47("");
47620
47747
  const [inputUnit, setInputUnit] = useState47("fiat");
47621
47748
  const [isSubmitting, setIsSubmitting] = useState47(false);
@@ -47634,7 +47761,16 @@ function WithdrawForm({
47634
47761
  setIsMaxed(false);
47635
47762
  }, [balanceData?.balanceBaseUnit]);
47636
47763
  const trimmedAddress = recipientAddress.trim();
47637
- const debouncedAddress = useDebounce(trimmedAddress, 500);
47764
+ const trimmedMemoTag = memoTag.trim();
47765
+ const isMemoTagValid = isDestinationTagValid(trimmedMemoTag);
47766
+ const destinationKey = `${selectedChain?.chain_type ?? ""}:${selectedChain?.chain_id ?? ""}:${selectedChain?.token_address ?? ""}`;
47767
+ const recipientKey = `${destinationKey}:${trimmedAddress}`;
47768
+ const memoTagRequired = trimmedAddress.length > 0 && memoTagRequiredFor === recipientKey;
47769
+ const effectiveRecipient = memoTagRequired && isMemoTagValid ? `${trimmedAddress}:${trimmedMemoTag}` : trimmedAddress;
47770
+ const debouncedRecipient = useDebounce(effectiveRecipient, 500);
47771
+ const isXrplDestination = selectedChain?.chain_type === "xrpl";
47772
+ const isXrplRecipientMalformed = isXrplDestination && trimmedAddress.length > 5 && !isXrplRecipientShapeValid(effectiveRecipient);
47773
+ const canVerifyXrplRecipient = !isXrplDestination || isXrplRecipientShapeValid(debouncedRecipient);
47638
47774
  const {
47639
47775
  data: addressVerification,
47640
47776
  isLoading: isVerifyingAddress,
@@ -47643,16 +47779,36 @@ function WithdrawForm({
47643
47779
  chainType: selectedChain?.chain_type,
47644
47780
  chainId: selectedChain?.chain_id,
47645
47781
  tokenAddress: selectedChain?.token_address,
47646
- recipientAddress: debouncedAddress,
47782
+ recipientAddress: debouncedRecipient,
47647
47783
  publishableKey,
47648
- enabled: debouncedAddress.length > 5 && !!selectedChain
47784
+ enabled: debouncedRecipient.length > 5 && !!selectedChain && canVerifyXrplRecipient
47649
47785
  });
47650
- const isDebouncing = trimmedAddress !== debouncedAddress;
47786
+ const isDebouncing = effectiveRecipient !== debouncedRecipient;
47787
+ const verifiedRecipientKey = `${destinationKey}:${debouncedRecipient}`;
47788
+ useEffect45(() => {
47789
+ if (addressVerification?.failure_code === "destination_tag_required") {
47790
+ setMemoTagRequiredFor(verifiedRecipientKey);
47791
+ }
47792
+ }, [addressVerification, verifiedRecipientKey]);
47793
+ useEffect45(() => {
47794
+ setMemoTag("");
47795
+ }, [recipientKey]);
47796
+ const xrplFormatHint = useMemo23(
47797
+ () => interpolate(t.invalidXrplAddress, {
47798
+ chain_name: selectedChain?.chain_name ?? "XRP Ledger"
47799
+ }),
47800
+ [t, selectedChain]
47801
+ );
47651
47802
  const addressError = useMemo23(() => {
47652
47803
  if (!trimmedAddress || trimmedAddress.length <= 5) return null;
47804
+ if (isXrplRecipientMalformed) return xrplFormatHint;
47653
47805
  if (isDebouncing || isVerifyingAddress) return null;
47654
- if (verifyError) return t.invalidAddress;
47806
+ if (verifyError) return isXrplDestination ? xrplFormatHint : t.invalidAddress;
47655
47807
  if (addressVerification && !addressVerification.valid) {
47808
+ if (addressVerification.failure_code === "destination_tag_required")
47809
+ return memoTagRequired ? null : interpolate(tCrypto.addressValidation.errors.destination_tag_required, {
47810
+ chain_name: selectedChain?.chain_name ?? ""
47811
+ });
47656
47812
  if (addressVerification.message && addressVerification.message.trim().length > 0) {
47657
47813
  return addressVerification.message;
47658
47814
  }
@@ -47665,13 +47821,17 @@ function WithdrawForm({
47665
47821
  token_symbol: selectedToken?.symbol ?? "",
47666
47822
  chain_name: selectedChain?.chain_name ?? ""
47667
47823
  });
47668
- return t.invalidAddress;
47824
+ return isXrplDestination ? xrplFormatHint : t.invalidAddress;
47669
47825
  }
47670
47826
  return null;
47671
47827
  }, [
47672
47828
  trimmedAddress,
47673
47829
  isDebouncing,
47674
47830
  isVerifyingAddress,
47831
+ isXrplDestination,
47832
+ isXrplRecipientMalformed,
47833
+ memoTagRequired,
47834
+ xrplFormatHint,
47675
47835
  verifyError,
47676
47836
  addressVerification,
47677
47837
  selectedChain,
@@ -47679,6 +47839,7 @@ function WithdrawForm({
47679
47839
  t,
47680
47840
  tCrypto
47681
47841
  ]);
47842
+ const memoTagError = memoTagRequired && trimmedMemoTag.length > 0 && !isMemoTagValid ? t.invalidMemoTag : null;
47682
47843
  const isAddressValid = !isDebouncing && !!addressVerification?.valid && !addressError;
47683
47844
  const { showWarning: showActivationWarning, activationFee: effectiveActivationFee } = useHypercoreWithdrawActivation({
47684
47845
  userId: externalUserId,
@@ -47686,7 +47847,7 @@ function WithdrawForm({
47686
47847
  senderAddress,
47687
47848
  sourceChainId,
47688
47849
  sourceChainType,
47689
- recipientAddress: debouncedAddress,
47850
+ recipientAddress: debouncedRecipient,
47690
47851
  destinationChainType: selectedChain?.chain_type,
47691
47852
  destinationChainId: selectedChain?.chain_id,
47692
47853
  destinationTokenAddress: selectedChain?.token_address,
@@ -47800,7 +47961,7 @@ function WithdrawForm({
47800
47961
  const isBalanceBelowMinimum = !isLoadingBalance && minimumWithdrawAmountUsd !== null && Math.round(balanceUsdNum * 100) / 100 < minimumWithdrawAmountUsd;
47801
47962
  const isBelowMinimum = minimumWithdrawAmountUsd !== null && fiatAmountFromInput > 0 && Math.round(fiatAmountFromInput * 100) / 100 < minimumWithdrawAmountUsd;
47802
47963
  const isOverBalance = inputUnit === "crypto" ? cryptoAmountFromInput > 0 && balanceCrypto > 0 && cryptoAmountFromInput > balanceCrypto : fiatAmountFromInput > 0 && balanceUsdNum > 0 && Math.round(fiatAmountFromInput * 100) / 100 > Math.round(balanceUsdNum * 100) / 100;
47803
- const isFormValid = trimmedAddress.length > 0 && amount.trim().length > 0 && cryptoAmountFromInput > 0 && isAddressValid && !isBelowMinimum && !isOverBalance && !isBalanceBelowMinimum && !!balanceData;
47964
+ const isFormValid = trimmedAddress.length > 0 && amount.trim().length > 0 && cryptoAmountFromInput > 0 && isAddressValid && !(memoTagRequired && !isMemoTagValid) && !isBelowMinimum && !isOverBalance && !isBalanceBelowMinimum && !!balanceData;
47804
47965
  const handleWithdraw = useCallback18(async () => {
47805
47966
  if (!selectedToken || !selectedChain) return;
47806
47967
  if (!isFormValid) return;
@@ -47814,7 +47975,7 @@ function WithdrawForm({
47814
47975
  destinationChainType: selectedChain.chain_type,
47815
47976
  destinationChainId: selectedChain.chain_id,
47816
47977
  destinationTokenAddress: selectedChain.token_address,
47817
- recipientAddress: trimmedAddress
47978
+ recipientAddress: effectiveRecipient
47818
47979
  });
47819
47980
  let amountBaseUnit = isMaxed ? balanceData.balanceBaseUnit : computeBaseUnit(
47820
47981
  balanceData.balanceBaseUnit,
@@ -47863,7 +48024,7 @@ function WithdrawForm({
47863
48024
  amount: humanAmount,
47864
48025
  amountBaseUnit,
47865
48026
  withdrawIntentAddress: depositWallet.address,
47866
- recipientAddress: trimmedAddress
48027
+ recipientAddress: effectiveRecipient
47867
48028
  };
47868
48029
  const usdValue = isMaxed ? balanceUsdNum : fiatAmountFromInput;
47869
48030
  onWithdrawStarted?.({
@@ -47900,7 +48061,7 @@ function WithdrawForm({
47900
48061
  isFormValid,
47901
48062
  cryptoAmountFromInput,
47902
48063
  sourceDecimals,
47903
- trimmedAddress,
48064
+ effectiveRecipient,
47904
48065
  publishableKey,
47905
48066
  onWithdraw,
47906
48067
  sourceChainType,
@@ -47951,7 +48112,7 @@ function WithdrawForm({
47951
48112
  "input",
47952
48113
  {
47953
48114
  type: "text",
47954
- placeholder: t.recipientAddressPlaceholder,
48115
+ placeholder: isXrplDestination ? t.recipientAddressPlaceholderXrpl : t.recipientAddressPlaceholder,
47955
48116
  value: recipientAddress,
47956
48117
  onChange: (e) => {
47957
48118
  setRecipientAddress(e.target.value);
@@ -47987,7 +48148,7 @@ function WithdrawForm({
47987
48148
  ]
47988
48149
  }
47989
48150
  ),
47990
- (isDebouncing || isVerifyingAddress) && trimmedAddress.length > 5 && /* @__PURE__ */ jsxs68("div", { className: "uf-flex uf-items-center uf-gap-1.5 uf-mt-1.5", children: [
48151
+ (isDebouncing || isVerifyingAddress) && trimmedAddress.length > 5 && !addressError && /* @__PURE__ */ jsxs68("div", { className: "uf-flex uf-items-center uf-gap-1.5 uf-mt-1.5", children: [
47991
48152
  /* @__PURE__ */ jsx79(
47992
48153
  LoaderCircle,
47993
48154
  {
@@ -48009,6 +48170,61 @@ function WithdrawForm({
48009
48170
  /* @__PURE__ */ jsx79("span", { className: "uf-text-xs", style: { color: colors2.error, fontFamily: fonts.regular }, children: addressError })
48010
48171
  ] })
48011
48172
  ] }),
48173
+ memoTagRequired && /* @__PURE__ */ jsxs68("div", { children: [
48174
+ /* @__PURE__ */ jsx79(
48175
+ "div",
48176
+ {
48177
+ className: "uf-text-xs uf-mb-1.5",
48178
+ style: { color: components.card.labelColor, fontFamily: fonts.medium },
48179
+ children: t.memoTag
48180
+ }
48181
+ ),
48182
+ /* @__PURE__ */ jsx79(
48183
+ "style",
48184
+ {
48185
+ dangerouslySetInnerHTML: {
48186
+ __html: `.uf-withdraw-memo::placeholder { color: ${components.search.placeholderColor}; }`
48187
+ }
48188
+ }
48189
+ ),
48190
+ /* @__PURE__ */ jsx79(
48191
+ "input",
48192
+ {
48193
+ type: "text",
48194
+ inputMode: "numeric",
48195
+ placeholder: t.memoTagPlaceholder,
48196
+ value: memoTag,
48197
+ onChange: (e) => {
48198
+ setMemoTag(e.target.value);
48199
+ setSubmitError(null);
48200
+ },
48201
+ className: "uf-withdraw-memo uf-w-full uf-px-3 uf-py-2.5 uf-text-sm uf-outline-none",
48202
+ style: {
48203
+ backgroundColor: components.search.backgroundColor,
48204
+ borderRadius: components.input.borderRadius,
48205
+ border: `${components.input.borderWidth}px solid ${memoTagError ? colors2.error : components.input.borderColor}`,
48206
+ color: components.search.inputColor,
48207
+ fontFamily: fonts.regular
48208
+ }
48209
+ }
48210
+ ),
48211
+ /* @__PURE__ */ jsxs68("div", { className: "uf-flex uf-items-center uf-gap-1.5 uf-mt-1.5", children: [
48212
+ memoTagError && /* @__PURE__ */ jsx79(TriangleAlert, { className: "uf-w-3 uf-h-3", style: { color: colors2.error } }),
48213
+ /* @__PURE__ */ jsx79(
48214
+ "span",
48215
+ {
48216
+ className: "uf-text-xs",
48217
+ style: {
48218
+ color: memoTagError ? colors2.error : colors2.foregroundMuted,
48219
+ fontFamily: fonts.regular
48220
+ },
48221
+ children: memoTagError ?? interpolate(t.memoTagRequiredHint, {
48222
+ chain_name: selectedChain?.chain_name ?? "XRP Ledger"
48223
+ })
48224
+ }
48225
+ )
48226
+ ] })
48227
+ ] }),
48012
48228
  /* @__PURE__ */ jsxs68("div", { children: [
48013
48229
  /* @__PURE__ */ jsxs68(
48014
48230
  "div",
@@ -49102,28 +49318,428 @@ function WithdrawModal({
49102
49318
  }
49103
49319
  ) });
49104
49320
  }
49321
+ var COUNTRIES = [
49322
+ { alpha2: "AD", name: "Andorra", dialCode: "376" },
49323
+ { alpha2: "AE", name: "United Arab Emirates", dialCode: "971" },
49324
+ { alpha2: "AF", name: "Afghanistan", dialCode: "93" },
49325
+ { alpha2: "AG", name: "Antigua and Barbuda", dialCode: "1" },
49326
+ { alpha2: "AI", name: "Anguilla", dialCode: "1" },
49327
+ { alpha2: "AL", name: "Albania", dialCode: "355" },
49328
+ { alpha2: "AM", name: "Armenia", dialCode: "374" },
49329
+ { alpha2: "AO", name: "Angola", dialCode: "244" },
49330
+ { alpha2: "AQ", name: "Antarctica" },
49331
+ { alpha2: "AR", name: "Argentina", dialCode: "54" },
49332
+ { alpha2: "AS", name: "American Samoa", dialCode: "1" },
49333
+ { alpha2: "AT", name: "Austria", dialCode: "43" },
49334
+ { alpha2: "AU", name: "Australia", dialCode: "61" },
49335
+ { alpha2: "AW", name: "Aruba", dialCode: "297" },
49336
+ { alpha2: "AX", name: "\xC5land Islands", dialCode: "358" },
49337
+ { alpha2: "AZ", name: "Azerbaijan", dialCode: "994" },
49338
+ { alpha2: "BA", name: "Bosnia and Herzegovina", dialCode: "387" },
49339
+ { alpha2: "BB", name: "Barbados", dialCode: "1" },
49340
+ { alpha2: "BD", name: "Bangladesh", dialCode: "880" },
49341
+ { alpha2: "BE", name: "Belgium", dialCode: "32" },
49342
+ { alpha2: "BF", name: "Burkina Faso", dialCode: "226" },
49343
+ { alpha2: "BG", name: "Bulgaria", dialCode: "359" },
49344
+ { alpha2: "BH", name: "Bahrain", dialCode: "973" },
49345
+ { alpha2: "BI", name: "Burundi", dialCode: "257" },
49346
+ { alpha2: "BJ", name: "Benin", dialCode: "229" },
49347
+ { alpha2: "BL", name: "Saint Barth\xE9lemy", dialCode: "590" },
49348
+ { alpha2: "BM", name: "Bermuda", dialCode: "1" },
49349
+ { alpha2: "BN", name: "Brunei", dialCode: "673" },
49350
+ { alpha2: "BO", name: "Bolivia", dialCode: "591" },
49351
+ { alpha2: "BQ", name: "Bonaire, Sint Eustatius and Saba", dialCode: "599" },
49352
+ { alpha2: "BR", name: "Brazil", dialCode: "55" },
49353
+ { alpha2: "BS", name: "Bahamas", dialCode: "1" },
49354
+ { alpha2: "BT", name: "Bhutan", dialCode: "975" },
49355
+ { alpha2: "BV", name: "Bouvet Island" },
49356
+ { alpha2: "BW", name: "Botswana", dialCode: "267" },
49357
+ { alpha2: "BY", name: "Belarus", dialCode: "375" },
49358
+ { alpha2: "BZ", name: "Belize", dialCode: "501" },
49359
+ { alpha2: "CA", name: "Canada", dialCode: "1" },
49360
+ { alpha2: "CC", name: "Cocos (Keeling) Islands", dialCode: "61" },
49361
+ { alpha2: "CD", name: "Congo (Democratic Republic)", dialCode: "243" },
49362
+ { alpha2: "CF", name: "Central African Republic", dialCode: "236" },
49363
+ { alpha2: "CG", name: "Congo (Republic)", dialCode: "242" },
49364
+ { alpha2: "CH", name: "Switzerland", dialCode: "41" },
49365
+ { alpha2: "CI", name: "C\xF4te d'Ivoire", dialCode: "225" },
49366
+ { alpha2: "CK", name: "Cook Islands", dialCode: "682" },
49367
+ { alpha2: "CL", name: "Chile", dialCode: "56" },
49368
+ { alpha2: "CM", name: "Cameroon", dialCode: "237" },
49369
+ { alpha2: "CN", name: "China", dialCode: "86" },
49370
+ { alpha2: "CO", name: "Colombia", dialCode: "57" },
49371
+ { alpha2: "CR", name: "Costa Rica", dialCode: "506" },
49372
+ { alpha2: "CU", name: "Cuba", dialCode: "53" },
49373
+ { alpha2: "CV", name: "Cabo Verde", dialCode: "238" },
49374
+ { alpha2: "CW", name: "Cura\xE7ao", dialCode: "599" },
49375
+ { alpha2: "CX", name: "Christmas Island", dialCode: "61" },
49376
+ { alpha2: "CY", name: "Cyprus", dialCode: "357" },
49377
+ { alpha2: "CZ", name: "Czech Republic", dialCode: "420" },
49378
+ { alpha2: "DE", name: "Germany", dialCode: "49" },
49379
+ { alpha2: "DJ", name: "Djibouti", dialCode: "253" },
49380
+ { alpha2: "DK", name: "Denmark", dialCode: "45" },
49381
+ { alpha2: "DM", name: "Dominica", dialCode: "1" },
49382
+ { alpha2: "DO", name: "Dominican Republic", dialCode: "1" },
49383
+ { alpha2: "DZ", name: "Algeria", dialCode: "213" },
49384
+ { alpha2: "EC", name: "Ecuador", dialCode: "593" },
49385
+ { alpha2: "EE", name: "Estonia", dialCode: "372" },
49386
+ { alpha2: "EG", name: "Egypt", dialCode: "20" },
49387
+ { alpha2: "EH", name: "Western Sahara", dialCode: "212" },
49388
+ { alpha2: "ER", name: "Eritrea", dialCode: "291" },
49389
+ { alpha2: "ES", name: "Spain", dialCode: "34" },
49390
+ { alpha2: "ET", name: "Ethiopia", dialCode: "251" },
49391
+ { alpha2: "FI", name: "Finland", dialCode: "358" },
49392
+ { alpha2: "FJ", name: "Fiji", dialCode: "679" },
49393
+ { alpha2: "FK", name: "Falkland Islands", dialCode: "500" },
49394
+ { alpha2: "FM", name: "Micronesia", dialCode: "691" },
49395
+ { alpha2: "FO", name: "Faroe Islands", dialCode: "298" },
49396
+ { alpha2: "FR", name: "France", dialCode: "33" },
49397
+ { alpha2: "GA", name: "Gabon", dialCode: "241" },
49398
+ { alpha2: "GB", name: "United Kingdom", dialCode: "44" },
49399
+ { alpha2: "GD", name: "Grenada", dialCode: "1" },
49400
+ { alpha2: "GE", name: "Georgia", dialCode: "995" },
49401
+ { alpha2: "GF", name: "French Guiana", dialCode: "594" },
49402
+ { alpha2: "GG", name: "Guernsey", dialCode: "44" },
49403
+ { alpha2: "GH", name: "Ghana", dialCode: "233" },
49404
+ { alpha2: "GI", name: "Gibraltar", dialCode: "350" },
49405
+ { alpha2: "GL", name: "Greenland", dialCode: "299" },
49406
+ { alpha2: "GM", name: "Gambia", dialCode: "220" },
49407
+ { alpha2: "GN", name: "Guinea", dialCode: "224" },
49408
+ { alpha2: "GP", name: "Guadeloupe", dialCode: "590" },
49409
+ { alpha2: "GQ", name: "Equatorial Guinea", dialCode: "240" },
49410
+ { alpha2: "GR", name: "Greece", dialCode: "30" },
49411
+ { alpha2: "GS", name: "South Georgia and the South Sandwich Islands" },
49412
+ { alpha2: "GT", name: "Guatemala", dialCode: "502" },
49413
+ { alpha2: "GU", name: "Guam", dialCode: "1" },
49414
+ { alpha2: "GW", name: "Guinea-Bissau", dialCode: "245" },
49415
+ { alpha2: "GY", name: "Guyana", dialCode: "592" },
49416
+ { alpha2: "HK", name: "Hong Kong", dialCode: "852" },
49417
+ { alpha2: "HM", name: "Heard Island and McDonald Islands" },
49418
+ { alpha2: "HN", name: "Honduras", dialCode: "504" },
49419
+ { alpha2: "HR", name: "Croatia", dialCode: "385" },
49420
+ { alpha2: "HT", name: "Haiti", dialCode: "509" },
49421
+ { alpha2: "HU", name: "Hungary", dialCode: "36" },
49422
+ { alpha2: "ID", name: "Indonesia", dialCode: "62" },
49423
+ { alpha2: "IE", name: "Ireland", dialCode: "353" },
49424
+ { alpha2: "IL", name: "Israel", dialCode: "972" },
49425
+ { alpha2: "IM", name: "Isle of Man", dialCode: "44" },
49426
+ { alpha2: "IN", name: "India", dialCode: "91" },
49427
+ { alpha2: "IO", name: "British Indian Ocean Territory", dialCode: "246" },
49428
+ { alpha2: "IQ", name: "Iraq", dialCode: "964" },
49429
+ { alpha2: "IR", name: "Iran", dialCode: "98" },
49430
+ { alpha2: "IS", name: "Iceland", dialCode: "354" },
49431
+ { alpha2: "IT", name: "Italy", dialCode: "39" },
49432
+ { alpha2: "JE", name: "Jersey", dialCode: "44" },
49433
+ { alpha2: "JM", name: "Jamaica", dialCode: "1" },
49434
+ { alpha2: "JO", name: "Jordan", dialCode: "962" },
49435
+ { alpha2: "JP", name: "Japan", dialCode: "81" },
49436
+ { alpha2: "KE", name: "Kenya", dialCode: "254" },
49437
+ { alpha2: "KG", name: "Kyrgyzstan", dialCode: "996" },
49438
+ { alpha2: "KH", name: "Cambodia", dialCode: "855" },
49439
+ { alpha2: "KI", name: "Kiribati", dialCode: "686" },
49440
+ { alpha2: "KM", name: "Comoros", dialCode: "269" },
49441
+ { alpha2: "KN", name: "Saint Kitts and Nevis", dialCode: "1" },
49442
+ { alpha2: "KP", name: "North Korea", dialCode: "850" },
49443
+ { alpha2: "KR", name: "South Korea", dialCode: "82" },
49444
+ { alpha2: "KW", name: "Kuwait", dialCode: "965" },
49445
+ { alpha2: "KY", name: "Cayman Islands", dialCode: "1" },
49446
+ { alpha2: "KZ", name: "Kazakhstan", dialCode: "7" },
49447
+ { alpha2: "LA", name: "Laos", dialCode: "856" },
49448
+ { alpha2: "LB", name: "Lebanon", dialCode: "961" },
49449
+ { alpha2: "LC", name: "Saint Lucia", dialCode: "1" },
49450
+ { alpha2: "LI", name: "Liechtenstein", dialCode: "423" },
49451
+ { alpha2: "LK", name: "Sri Lanka", dialCode: "94" },
49452
+ { alpha2: "LR", name: "Liberia", dialCode: "231" },
49453
+ { alpha2: "LS", name: "Lesotho", dialCode: "266" },
49454
+ { alpha2: "LT", name: "Lithuania", dialCode: "370" },
49455
+ { alpha2: "LU", name: "Luxembourg", dialCode: "352" },
49456
+ { alpha2: "LV", name: "Latvia", dialCode: "371" },
49457
+ { alpha2: "LY", name: "Libya", dialCode: "218" },
49458
+ { alpha2: "MA", name: "Morocco", dialCode: "212" },
49459
+ { alpha2: "MC", name: "Monaco", dialCode: "377" },
49460
+ { alpha2: "MD", name: "Moldova", dialCode: "373" },
49461
+ { alpha2: "ME", name: "Montenegro", dialCode: "382" },
49462
+ { alpha2: "MF", name: "Saint Martin (French part)", dialCode: "590" },
49463
+ { alpha2: "MG", name: "Madagascar", dialCode: "261" },
49464
+ { alpha2: "MH", name: "Marshall Islands", dialCode: "692" },
49465
+ { alpha2: "MK", name: "North Macedonia", dialCode: "389" },
49466
+ { alpha2: "ML", name: "Mali", dialCode: "223" },
49467
+ { alpha2: "MM", name: "Myanmar", dialCode: "95" },
49468
+ { alpha2: "MN", name: "Mongolia", dialCode: "976" },
49469
+ { alpha2: "MO", name: "Macao", dialCode: "853" },
49470
+ { alpha2: "MP", name: "Northern Mariana Islands", dialCode: "1" },
49471
+ { alpha2: "MQ", name: "Martinique", dialCode: "596" },
49472
+ { alpha2: "MR", name: "Mauritania", dialCode: "222" },
49473
+ { alpha2: "MS", name: "Montserrat", dialCode: "1" },
49474
+ { alpha2: "MT", name: "Malta", dialCode: "356" },
49475
+ { alpha2: "MU", name: "Mauritius", dialCode: "230" },
49476
+ { alpha2: "MV", name: "Maldives", dialCode: "960" },
49477
+ { alpha2: "MW", name: "Malawi", dialCode: "265" },
49478
+ { alpha2: "MX", name: "Mexico", dialCode: "52" },
49479
+ { alpha2: "MY", name: "Malaysia", dialCode: "60" },
49480
+ { alpha2: "MZ", name: "Mozambique", dialCode: "258" },
49481
+ { alpha2: "NA", name: "Namibia", dialCode: "264" },
49482
+ { alpha2: "NC", name: "New Caledonia", dialCode: "687" },
49483
+ { alpha2: "NE", name: "Niger", dialCode: "227" },
49484
+ { alpha2: "NF", name: "Norfolk Island", dialCode: "672" },
49485
+ { alpha2: "NG", name: "Nigeria", dialCode: "234" },
49486
+ { alpha2: "NI", name: "Nicaragua", dialCode: "505" },
49487
+ { alpha2: "NL", name: "Netherlands", dialCode: "31" },
49488
+ { alpha2: "NO", name: "Norway", dialCode: "47" },
49489
+ { alpha2: "NP", name: "Nepal", dialCode: "977" },
49490
+ { alpha2: "NR", name: "Nauru", dialCode: "674" },
49491
+ { alpha2: "NU", name: "Niue", dialCode: "683" },
49492
+ { alpha2: "NZ", name: "New Zealand", dialCode: "64" },
49493
+ { alpha2: "OM", name: "Oman", dialCode: "968" },
49494
+ { alpha2: "PA", name: "Panama", dialCode: "507" },
49495
+ { alpha2: "PE", name: "Peru", dialCode: "51" },
49496
+ { alpha2: "PF", name: "French Polynesia", dialCode: "689" },
49497
+ { alpha2: "PG", name: "Papua New Guinea", dialCode: "675" },
49498
+ { alpha2: "PH", name: "Philippines", dialCode: "63" },
49499
+ { alpha2: "PK", name: "Pakistan", dialCode: "92" },
49500
+ { alpha2: "PL", name: "Poland", dialCode: "48" },
49501
+ { alpha2: "PM", name: "Saint Pierre and Miquelon", dialCode: "508" },
49502
+ { alpha2: "PN", name: "Pitcairn", dialCode: "64" },
49503
+ { alpha2: "PR", name: "Puerto Rico", dialCode: "1" },
49504
+ { alpha2: "PS", name: "Palestine", dialCode: "970" },
49505
+ { alpha2: "PT", name: "Portugal", dialCode: "351" },
49506
+ { alpha2: "PW", name: "Palau", dialCode: "680" },
49507
+ { alpha2: "PY", name: "Paraguay", dialCode: "595" },
49508
+ { alpha2: "QA", name: "Qatar", dialCode: "974" },
49509
+ { alpha2: "RE", name: "R\xE9union", dialCode: "262" },
49510
+ { alpha2: "RO", name: "Romania", dialCode: "40" },
49511
+ { alpha2: "RS", name: "Serbia", dialCode: "381" },
49512
+ { alpha2: "RU", name: "Russia", dialCode: "7" },
49513
+ { alpha2: "RW", name: "Rwanda", dialCode: "250" },
49514
+ { alpha2: "SA", name: "Saudi Arabia", dialCode: "966" },
49515
+ { alpha2: "SB", name: "Solomon Islands", dialCode: "677" },
49516
+ { alpha2: "SC", name: "Seychelles", dialCode: "248" },
49517
+ { alpha2: "SD", name: "Sudan", dialCode: "249" },
49518
+ { alpha2: "SE", name: "Sweden", dialCode: "46" },
49519
+ { alpha2: "SG", name: "Singapore", dialCode: "65" },
49520
+ { alpha2: "SH", name: "Saint Helena, Ascension and Tristan da Cunha", dialCode: "290" },
49521
+ { alpha2: "SI", name: "Slovenia", dialCode: "386" },
49522
+ { alpha2: "SJ", name: "Svalbard and Jan Mayen", dialCode: "47" },
49523
+ { alpha2: "SK", name: "Slovakia", dialCode: "421" },
49524
+ { alpha2: "SL", name: "Sierra Leone", dialCode: "232" },
49525
+ { alpha2: "SM", name: "San Marino", dialCode: "378" },
49526
+ { alpha2: "SN", name: "Senegal", dialCode: "221" },
49527
+ { alpha2: "SO", name: "Somalia", dialCode: "252" },
49528
+ { alpha2: "SR", name: "Suriname", dialCode: "597" },
49529
+ { alpha2: "SS", name: "South Sudan", dialCode: "211" },
49530
+ { alpha2: "ST", name: "Sao Tome and Principe", dialCode: "239" },
49531
+ { alpha2: "SV", name: "El Salvador", dialCode: "503" },
49532
+ { alpha2: "SX", name: "Sint Maarten (Dutch part)", dialCode: "1" },
49533
+ { alpha2: "SY", name: "Syria", dialCode: "963" },
49534
+ { alpha2: "SZ", name: "Eswatini", dialCode: "268" },
49535
+ { alpha2: "TC", name: "Turks and Caicos Islands", dialCode: "1" },
49536
+ { alpha2: "TD", name: "Chad", dialCode: "235" },
49537
+ { alpha2: "TF", name: "French Southern Territories" },
49538
+ { alpha2: "TG", name: "Togo", dialCode: "228" },
49539
+ { alpha2: "TH", name: "Thailand", dialCode: "66" },
49540
+ { alpha2: "TJ", name: "Tajikistan", dialCode: "992" },
49541
+ { alpha2: "TK", name: "Tokelau", dialCode: "690" },
49542
+ { alpha2: "TL", name: "Timor-Leste", dialCode: "670" },
49543
+ { alpha2: "TM", name: "Turkmenistan", dialCode: "993" },
49544
+ { alpha2: "TN", name: "Tunisia", dialCode: "216" },
49545
+ { alpha2: "TO", name: "Tonga", dialCode: "676" },
49546
+ { alpha2: "TR", name: "T\xFCrkiye", dialCode: "90" },
49547
+ { alpha2: "TT", name: "Trinidad and Tobago", dialCode: "1" },
49548
+ { alpha2: "TV", name: "Tuvalu", dialCode: "688" },
49549
+ { alpha2: "TW", name: "Taiwan", dialCode: "886" },
49550
+ { alpha2: "TZ", name: "Tanzania", dialCode: "255" },
49551
+ { alpha2: "UA", name: "Ukraine", dialCode: "380" },
49552
+ { alpha2: "UG", name: "Uganda", dialCode: "256" },
49553
+ { alpha2: "UM", name: "U.S. Minor Outlying Islands" },
49554
+ { alpha2: "US", name: "United States", dialCode: "1" },
49555
+ { alpha2: "UY", name: "Uruguay", dialCode: "598" },
49556
+ { alpha2: "UZ", name: "Uzbekistan", dialCode: "998" },
49557
+ { alpha2: "VA", name: "Vatican City", dialCode: "39" },
49558
+ { alpha2: "VC", name: "Saint Vincent and the Grenadines", dialCode: "1" },
49559
+ { alpha2: "VE", name: "Venezuela", dialCode: "58" },
49560
+ { alpha2: "VG", name: "British Virgin Islands", dialCode: "1" },
49561
+ { alpha2: "VI", name: "U.S. Virgin Islands", dialCode: "1" },
49562
+ { alpha2: "VN", name: "Vietnam", dialCode: "84" },
49563
+ { alpha2: "VU", name: "Vanuatu", dialCode: "678" },
49564
+ { alpha2: "WF", name: "Wallis and Futuna", dialCode: "681" },
49565
+ { alpha2: "WS", name: "Samoa", dialCode: "685" },
49566
+ { alpha2: "YE", name: "Yemen", dialCode: "967" },
49567
+ { alpha2: "YT", name: "Mayotte", dialCode: "262" },
49568
+ { alpha2: "ZA", name: "South Africa", dialCode: "27" },
49569
+ { alpha2: "ZM", name: "Zambia", dialCode: "260" },
49570
+ { alpha2: "ZW", name: "Zimbabwe", dialCode: "263" }
49571
+ ];
49572
+ var BY_ALPHA2 = new Map(COUNTRIES.map((c) => [c.alpha2, c]));
49573
+ var ALL_COUNTRIES = [...COUNTRIES].sort(
49574
+ (a, b) => a.name.localeCompare(b.name)
49575
+ );
49576
+ var UK = ["GB"];
49577
+ var EU = [
49578
+ "AT",
49579
+ "BE",
49580
+ "BG",
49581
+ "HR",
49582
+ "CY",
49583
+ "CZ",
49584
+ "DK",
49585
+ "EE",
49586
+ "FI",
49587
+ "FR",
49588
+ "DE",
49589
+ "GR",
49590
+ "HU",
49591
+ "IE",
49592
+ "IT",
49593
+ "LV",
49594
+ "LT",
49595
+ "LU",
49596
+ "MT",
49597
+ "NL",
49598
+ "PL",
49599
+ "PT",
49600
+ "RO",
49601
+ "SK",
49602
+ "SI",
49603
+ "ES",
49604
+ "SE"
49605
+ ];
49606
+ var EEA = [...EU, "IS", "LI", "NO"];
49607
+ var EUROPE = [
49608
+ ...EEA,
49609
+ ...UK,
49610
+ "CH",
49611
+ "AD",
49612
+ "MC",
49613
+ "SM",
49614
+ "VA",
49615
+ "GI",
49616
+ "GG",
49617
+ "JE",
49618
+ "IM",
49619
+ "FO",
49620
+ "AX",
49621
+ "SJ",
49622
+ "GL",
49623
+ "PM",
49624
+ "AL",
49625
+ "BA",
49626
+ "ME",
49627
+ "MK",
49628
+ "RS",
49629
+ "MD",
49630
+ "UA",
49631
+ "BY",
49632
+ "RU",
49633
+ "GE",
49634
+ "AM",
49635
+ "AZ",
49636
+ "TR"
49637
+ ];
49638
+ var INDIA = ["IN"];
49639
+ var SEA = ["BN", "KH", "ID", "LA", "MY", "MM", "PH", "SG", "TH", "VN", "TL"];
49640
+ var ASIA = [
49641
+ ...SEA,
49642
+ ...INDIA,
49643
+ "CN",
49644
+ "HK",
49645
+ "MO",
49646
+ "TW",
49647
+ "JP",
49648
+ "KR",
49649
+ "KP",
49650
+ "MN",
49651
+ "PK",
49652
+ "BD",
49653
+ "LK",
49654
+ "NP",
49655
+ "BT",
49656
+ "MV",
49657
+ "AF",
49658
+ "KZ",
49659
+ "KG",
49660
+ "TJ",
49661
+ "TM",
49662
+ "UZ"
49663
+ ];
49664
+ var CARIBBEAN = [
49665
+ "AI",
49666
+ "AG",
49667
+ "AW",
49668
+ "BS",
49669
+ "BB",
49670
+ "BM",
49671
+ "BQ",
49672
+ "VG",
49673
+ "KY",
49674
+ "CU",
49675
+ "CW",
49676
+ "DM",
49677
+ "DO",
49678
+ "GD",
49679
+ "GP",
49680
+ "HT",
49681
+ "JM",
49682
+ "MQ",
49683
+ "MS",
49684
+ "PR",
49685
+ "BL",
49686
+ "KN",
49687
+ "LC",
49688
+ "MF",
49689
+ "VC",
49690
+ "SX",
49691
+ "TT",
49692
+ "TC",
49693
+ "VI"
49694
+ ];
49695
+ var LATAM = [
49696
+ ...CARIBBEAN,
49697
+ "MX",
49698
+ "BZ",
49699
+ "CR",
49700
+ "SV",
49701
+ "GT",
49702
+ "HN",
49703
+ "NI",
49704
+ "PA",
49705
+ "AR",
49706
+ "BO",
49707
+ "BR",
49708
+ "CL",
49709
+ "CO",
49710
+ "EC",
49711
+ "FK",
49712
+ "GF",
49713
+ "GY",
49714
+ "PY",
49715
+ "PE",
49716
+ "GS",
49717
+ "SR",
49718
+ "UY",
49719
+ "VE"
49720
+ ];
49105
49721
 
49106
49722
  // src/provider.tsx
49107
49723
  import {
49108
49724
  setApiConfig,
49109
49725
  getApiBaseUrl
49110
49726
  } from "@unifold/core";
49111
- import { jsx as jsx84, jsxs as jsxs73 } from "react/jsx-runtime";
49727
+ import { jsx as jsx87, jsxs as jsxs75 } from "react/jsx-runtime";
49112
49728
  function UnifoldProvider({
49113
49729
  children,
49114
49730
  publishableKey,
49115
49731
  queryClient,
49116
49732
  config
49117
49733
  }) {
49118
- const [isOpen, setIsOpen] = useState51(false);
49119
- const [depositConfig, setDepositConfig] = useState51(null);
49120
- const [isCheckoutOpen, setIsCheckoutOpen] = useState51(false);
49121
- const [checkoutConfig, setCheckoutConfig] = useState51(null);
49122
- const [isWithdrawOpen, setIsWithdrawOpen] = useState51(false);
49123
- const [withdrawConfig, setWithdrawConfig] = useState51(null);
49734
+ const [isOpen, setIsOpen] = useState52(false);
49735
+ const [depositConfig, setDepositConfig] = useState52(null);
49736
+ const [isCheckoutOpen, setIsCheckoutOpen] = useState52(false);
49737
+ const [checkoutConfig, setCheckoutConfig] = useState52(null);
49738
+ const [isWithdrawOpen, setIsWithdrawOpen] = useState52(false);
49739
+ const [withdrawConfig, setWithdrawConfig] = useState52(null);
49124
49740
  const [resolvedTheme, setResolvedTheme] = React45.useState("dark");
49125
49741
  const incidentBannerEnabled = config?.notifications?.incidentBanner;
49126
- const tracker = useMemo26(
49742
+ const tracker = useMemo27(
49127
49743
  () => createEventTracker({
49128
49744
  publishableKey,
49129
49745
  endpoint: `${getApiBaseUrl()}/v1/public/events`
@@ -49393,7 +50009,7 @@ function UnifoldProvider({
49393
50009
  withdrawPromiseRef.current = null;
49394
50010
  }
49395
50011
  }, []);
49396
- const contextValue = useMemo26(
50012
+ const contextValue = useMemo27(
49397
50013
  () => ({
49398
50014
  beginDeposit,
49399
50015
  closeDeposit,
@@ -49415,7 +50031,7 @@ function UnifoldProvider({
49415
50031
  handleWithdrawError
49416
50032
  ]
49417
50033
  );
49418
- return /* @__PURE__ */ jsx84(BaseUnifoldProvider, { publishableKey, queryClient, children: /* @__PURE__ */ jsx84(ConnectContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx84(AnalyticsProvider, { tracker, children: /* @__PURE__ */ jsx84(I18nProvider, { locale: config?.locale, children: /* @__PURE__ */ jsxs73(
50034
+ return /* @__PURE__ */ jsx87(BaseUnifoldProvider, { publishableKey, queryClient, children: /* @__PURE__ */ jsx87(ConnectContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx87(AnalyticsProvider, { tracker, children: /* @__PURE__ */ jsx87(I18nProvider, { locale: config?.locale, children: /* @__PURE__ */ jsxs75(
49419
50035
  ThemeProvider,
49420
50036
  {
49421
50037
  mode: resolvedTheme,
@@ -49426,7 +50042,7 @@ function UnifoldProvider({
49426
50042
  components: config?.components,
49427
50043
  children: [
49428
50044
  children,
49429
- checkoutConfig && /* @__PURE__ */ jsx84(
50045
+ checkoutConfig && /* @__PURE__ */ jsx87(
49430
50046
  CheckoutModal,
49431
50047
  {
49432
50048
  open: isCheckoutOpen,
@@ -49448,7 +50064,7 @@ function UnifoldProvider({
49448
50064
  onEvent: checkoutConfig.onEvent
49449
50065
  }
49450
50066
  ),
49451
- withdrawConfig && /* @__PURE__ */ jsx84(
50067
+ withdrawConfig && /* @__PURE__ */ jsx87(
49452
50068
  WithdrawModal,
49453
50069
  {
49454
50070
  open: isWithdrawOpen,
@@ -49476,7 +50092,7 @@ function UnifoldProvider({
49476
50092
  theme: resolvedTheme
49477
50093
  }
49478
50094
  ),
49479
- depositConfig && /* @__PURE__ */ jsx84(
50095
+ depositConfig && /* @__PURE__ */ jsx87(
49480
50096
  DepositModal,
49481
50097
  {
49482
50098
  open: isOpen,
@@ -49587,7 +50203,7 @@ import {
49587
50203
  getTokenChains as getTokenChains2,
49588
50204
  getChainName as getChainName2,
49589
50205
  getIconUrl as getIconUrl6,
49590
- getIconUrlWithCdn as getIconUrlWithCdn2,
50206
+ getIconUrlWithCdn as getIconUrlWithCdn3,
49591
50207
  getPreferredIconUrl as getPreferredIconUrl3,
49592
50208
  getProjectConfig as getProjectConfig2,
49593
50209
  getIpAddress as getIpAddress2,
@@ -49641,7 +50257,7 @@ export {
49641
50257
  getDepositQuote2 as getDepositQuote,
49642
50258
  getFiatCurrencies3 as getFiatCurrencies,
49643
50259
  getIconUrl6 as getIconUrl,
49644
- getIconUrlWithCdn2 as getIconUrlWithCdn,
50260
+ getIconUrlWithCdn3 as getIconUrlWithCdn,
49645
50261
  getIpAddress2 as getIpAddress,
49646
50262
  getOnrampQuotes2 as getOnrampQuotes,
49647
50263
  getPreferredIconUrl3 as getPreferredIconUrl,