@turnkey/react-wallet-kit 1.4.3 → 1.5.1

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 (32) hide show
  1. package/dist/components/design/Svg.d.ts +2 -0
  2. package/dist/components/design/Svg.d.ts.map +1 -1
  3. package/dist/components/design/Svg.js +45 -0
  4. package/dist/components/design/Svg.js.map +1 -1
  5. package/dist/components/design/Svg.mjs +44 -1
  6. package/dist/components/design/Svg.mjs.map +1 -1
  7. package/dist/components/import/Import.d.ts +1 -0
  8. package/dist/components/import/Import.d.ts.map +1 -1
  9. package/dist/components/import/Import.js +3 -1
  10. package/dist/components/import/Import.js.map +1 -1
  11. package/dist/components/import/Import.mjs +3 -1
  12. package/dist/components/import/Import.mjs.map +1 -1
  13. package/dist/components/onramp/OnRamp.d.ts +14 -0
  14. package/dist/components/onramp/OnRamp.d.ts.map +1 -0
  15. package/dist/components/onramp/OnRamp.js +61 -0
  16. package/dist/components/onramp/OnRamp.js.map +1 -0
  17. package/dist/components/onramp/OnRamp.mjs +79 -0
  18. package/dist/components/onramp/OnRamp.mjs.map +1 -0
  19. package/dist/providers/client/Provider.d.ts.map +1 -1
  20. package/dist/providers/client/Provider.js +184 -1
  21. package/dist/providers/client/Provider.js.map +1 -1
  22. package/dist/providers/client/Provider.mjs +388 -138
  23. package/dist/providers/client/Provider.mjs.map +1 -1
  24. package/dist/providers/client/Types.d.ts +30 -1
  25. package/dist/providers/client/Types.d.ts.map +1 -1
  26. package/dist/providers/client/Types.js.map +1 -1
  27. package/dist/providers/client/Types.mjs.map +1 -1
  28. package/dist/types/method-types.d.ts +21 -1
  29. package/dist/types/method-types.d.ts.map +1 -1
  30. package/dist/utils/utils.js +1 -1
  31. package/dist/utils/utils.mjs +1 -1
  32. package/package.json +4 -4
@@ -7,7 +7,7 @@ import { useWalletProviderState, useDebouncedCallback, isValidSession, withTurnk
7
7
  import { clearKeys, clearAll, setCappedTimeoutInMap, clearKey, setTimeoutInMap } from '../../utils/timers.mjs';
8
8
  import { DEFAULT_SESSION_EXPIRATION_IN_SECONDS, WalletSource, OtpType, TurnkeyClient, Chain, WalletInterfaceType, getAuthProxyConfig } from '@turnkey/core';
9
9
  import { useState, useRef, useCallback, useEffect } from 'react';
10
- import { TurnkeyError, TurnkeyErrorCodes, AuthAction, OAuthProviders, TurnkeyNetworkError } from '@turnkey/sdk-types';
10
+ import { TurnkeyError, TurnkeyErrorCodes, AuthAction, OAuthProviders, FiatOnRampCryptoCurrency, FiatOnRampBlockchainNetwork, TurnkeyNetworkError } from '@turnkey/sdk-types';
11
11
  import { useModal } from '../modal/Hook.mjs';
12
12
  import { AuthState, ClientState, AuthMethod, ExportType, ImportType } from '../../types/base.mjs';
13
13
  import { AuthComponent } from '../../components/auth/index.mjs';
@@ -29,6 +29,8 @@ import { OtpVerification } from '../../components/auth/OTP.mjs';
29
29
  import { RemoveEmail } from '../../components/user/RemoveEmail.mjs';
30
30
  import { RemovePhoneNumber } from '../../components/user/RemovePhoneNumber.mjs';
31
31
  import { VerifyPage } from '../../components/verify/Verify.mjs';
32
+ import { OnRampPage } from '../../components/onramp/OnRamp.mjs';
33
+ import { CoinbaseLogo, MoonPayLogo } from '../../components/design/Svg.mjs';
32
34
 
33
35
  /**
34
36
  * Provides Turnkey client authentication, session management, wallet operations, and user profile management
@@ -789,11 +791,11 @@ var ClientProvider = function ClientProvider(_ref) {
789
791
  * @throws {TurnkeyError} If an error occurs while scheduling the session expiration.
790
792
  */
791
793
  function _initializeWalletProviderListeners() {
792
- _initializeWalletProviderListeners = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee109(walletProviders, onUpdateState) {
794
+ _initializeWalletProviderListeners = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee112(walletProviders, onUpdateState) {
793
795
  var _masterConfig$walletC0, _masterConfig$walletC1, _masterConfig$walletC10, _masterConfig$walletC11;
794
796
  var cleanups, nativeOnly, ethProviders, solProviders, wcProviders, wcProvider, attachEthereumListeners, attachSolanaListeners, _wcProvider$provider, _wcProvider$provider$, standardEvents, unsubscribe;
795
- return _regenerator().w(function (_context109) {
796
- while (1) switch (_context109.n) {
797
+ return _regenerator().w(function (_context112) {
798
+ while (1) switch (_context112.n) {
797
799
  case 0:
798
800
  attachSolanaListeners = function _attachSolanaListener(provider, onUpdateState) {
799
801
  var _provider$features;
@@ -801,19 +803,19 @@ var ClientProvider = function ClientProvider(_ref) {
801
803
  var walletEvents = provider === null || provider === void 0 ? void 0 : (_provider$features = provider.features) === null || _provider$features === void 0 ? void 0 : _provider$features["standard:events"];
802
804
  if (walletEvents !== null && walletEvents !== void 0 && walletEvents.on) {
803
805
  var offChange = walletEvents.on("change", /*#__PURE__*/function () {
804
- var _ref137 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee107(_evt) {
805
- return _regenerator().w(function (_context107) {
806
- while (1) switch (_context107.n) {
806
+ var _ref140 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee110(_evt) {
807
+ return _regenerator().w(function (_context110) {
808
+ while (1) switch (_context110.n) {
807
809
  case 0:
808
- _context107.n = 1;
810
+ _context110.n = 1;
809
811
  return onUpdateState();
810
812
  case 1:
811
- return _context107.a(2);
813
+ return _context110.a(2);
812
814
  }
813
- }, _callee107);
815
+ }, _callee110);
814
816
  }));
815
- return function (_x94) {
816
- return _ref137.apply(this, arguments);
817
+ return function (_x95) {
818
+ return _ref140.apply(this, arguments);
817
819
  };
818
820
  }());
819
821
  cleanups.push(offChange);
@@ -827,31 +829,31 @@ var ClientProvider = function ClientProvider(_ref) {
827
829
  attachEthereumListeners = function _attachEthereumListen(provider, onUpdateState) {
828
830
  if (typeof provider.on !== "function") return;
829
831
  var handleChainChanged = /*#__PURE__*/function () {
830
- var _ref135 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee105(_chainId) {
831
- return _regenerator().w(function (_context105) {
832
- while (1) switch (_context105.n) {
832
+ var _ref138 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee108(_chainId) {
833
+ return _regenerator().w(function (_context108) {
834
+ while (1) switch (_context108.n) {
833
835
  case 0:
834
- return _context105.a(2, onUpdateState());
836
+ return _context108.a(2, onUpdateState());
835
837
  }
836
- }, _callee105);
838
+ }, _callee108);
837
839
  }));
838
- return function handleChainChanged(_x92) {
839
- return _ref135.apply(this, arguments);
840
+ return function handleChainChanged(_x93) {
841
+ return _ref138.apply(this, arguments);
840
842
  };
841
843
  }();
842
844
  var handleAccountsChanged = /*#__PURE__*/function () {
843
- var _ref136 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee106(accounts) {
844
- return _regenerator().w(function (_context106) {
845
- while (1) switch (_context106.n) {
845
+ var _ref139 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee109(accounts) {
846
+ return _regenerator().w(function (_context109) {
847
+ while (1) switch (_context109.n) {
846
848
  case 0:
847
849
  if (accounts.length === 0) onUpdateState();
848
850
  case 1:
849
- return _context106.a(2);
851
+ return _context109.a(2);
850
852
  }
851
- }, _callee106);
853
+ }, _callee109);
852
854
  }));
853
- return function handleAccountsChanged(_x93) {
854
- return _ref136.apply(this, arguments);
855
+ return function handleAccountsChanged(_x94) {
856
+ return _ref139.apply(this, arguments);
855
857
  };
856
858
  }();
857
859
  var handleDisconnect = function handleDisconnect() {
@@ -867,10 +869,10 @@ var ClientProvider = function ClientProvider(_ref) {
867
869
  };
868
870
  };
869
871
  if (!(walletProviders.length === 0)) {
870
- _context109.n = 1;
872
+ _context112.n = 1;
871
873
  break;
872
874
  }
873
- return _context109.a(2, function () {});
875
+ return _context112.a(2, function () {});
874
876
  case 1:
875
877
  cleanups = []; // we only want to initialize these listeners for connected walletProviders
876
878
  nativeOnly = function nativeOnly(provider) {
@@ -908,9 +910,9 @@ var ClientProvider = function ClientProvider(_ref) {
908
910
  if (standardEvents !== null && standardEvents !== void 0 && standardEvents.on) {
909
911
  if (standardEvents !== null && standardEvents !== void 0 && standardEvents.on) {
910
912
  unsubscribe = standardEvents.on("change", /*#__PURE__*/function () {
911
- var _ref138 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee108(evt) {
912
- return _regenerator().w(function (_context108) {
913
- while (1) switch (_context108.n) {
913
+ var _ref141 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee111(evt) {
914
+ return _regenerator().w(function (_context111) {
915
+ while (1) switch (_context111.n) {
914
916
  case 0:
915
917
  // if the event is a proposalExpired, we want to re-fetch the providers
916
918
  // to refresh the uri, there is no need to refresh the wallets state
@@ -919,28 +921,28 @@ var ClientProvider = function ClientProvider(_ref) {
919
921
  }
920
922
  // any other event (disconnect, chain switch, accounts changed)
921
923
  // we refresh the wallets state
922
- _context108.n = 1;
924
+ _context111.n = 1;
923
925
  return onUpdateState();
924
926
  case 1:
925
- return _context108.a(2);
927
+ return _context111.a(2);
926
928
  }
927
- }, _callee108);
929
+ }, _callee111);
928
930
  }));
929
- return function (_x95) {
930
- return _ref138.apply(this, arguments);
931
+ return function (_x96) {
932
+ return _ref141.apply(this, arguments);
931
933
  };
932
934
  }());
933
935
  cleanups.push(unsubscribe);
934
936
  }
935
937
  }
936
938
  }
937
- return _context109.a(2, function () {
939
+ return _context112.a(2, function () {
938
940
  cleanups.forEach(function (remove) {
939
941
  return remove();
940
942
  });
941
943
  });
942
944
  }
943
- }, _callee109);
945
+ }, _callee112);
944
946
  }));
945
947
  return _initializeWalletProviderListeners.apply(this, arguments);
946
948
  }
@@ -956,13 +958,13 @@ var ClientProvider = function ClientProvider(_ref) {
956
958
  * @throws {TurnkeyError} If an error occurs while clearing the timers.
957
959
  */
958
960
  function _scheduleSessionExpiration() {
959
- _scheduleSessionExpiration = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee112(params) {
960
- var sessionKey, expiry, warnKey, now, expiryMs, timeUntilExpiry, _beforeExpiry, expireSession, warnAt, _callbacks$onError0, _callbacks$onError1, _t35;
961
- return _regenerator().w(function (_context112) {
962
- while (1) switch (_context112.p = _context112.n) {
961
+ _scheduleSessionExpiration = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee115(params) {
962
+ var sessionKey, expiry, warnKey, now, expiryMs, timeUntilExpiry, _beforeExpiry, expireSession, warnAt, _callbacks$onError0, _callbacks$onError1, _t38;
963
+ return _regenerator().w(function (_context115) {
964
+ while (1) switch (_context115.p = _context115.n) {
963
965
  case 0:
964
966
  sessionKey = params.sessionKey, expiry = params.expiry;
965
- _context112.p = 1;
967
+ _context115.p = 1;
966
968
  warnKey = "".concat(sessionKey, "-warning"); // Replace any prior timers for this session
967
969
  clearKey(expiryTimeoutsRef.current, sessionKey);
968
970
  clearKey(expiryTimeoutsRef.current, warnKey);
@@ -970,86 +972,86 @@ var ClientProvider = function ClientProvider(_ref) {
970
972
  expiryMs = expiry * 1000;
971
973
  timeUntilExpiry = expiryMs - now;
972
974
  _beforeExpiry = /*#__PURE__*/function () {
973
- var _ref139 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee110() {
975
+ var _ref142 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee113() {
974
976
  var _callbacks$beforeSess, _masterConfig$auth50;
975
977
  var activeSession, session;
976
- return _regenerator().w(function (_context110) {
977
- while (1) switch (_context110.n) {
978
+ return _regenerator().w(function (_context113) {
979
+ while (1) switch (_context113.n) {
978
980
  case 0:
979
- _context110.n = 1;
981
+ _context113.n = 1;
980
982
  return getSession();
981
983
  case 1:
982
- activeSession = _context110.v;
984
+ activeSession = _context113.v;
983
985
  if (!(!activeSession && expiryTimeoutsRef.current[warnKey])) {
984
- _context110.n = 2;
986
+ _context113.n = 2;
985
987
  break;
986
988
  }
987
989
  // Keep nudging until session materializes (short 10s timer is fine)
988
990
  setTimeoutInMap(expiryTimeoutsRef.current, warnKey, _beforeExpiry, 10000);
989
- return _context110.a(2);
991
+ return _context113.a(2);
990
992
  case 2:
991
- _context110.n = 3;
993
+ _context113.n = 3;
992
994
  return getSession({
993
995
  sessionKey: sessionKey
994
996
  });
995
997
  case 3:
996
- session = _context110.v;
998
+ session = _context113.v;
997
999
  if (session) {
998
- _context110.n = 4;
1000
+ _context113.n = 4;
999
1001
  break;
1000
1002
  }
1001
- return _context110.a(2);
1003
+ return _context113.a(2);
1002
1004
  case 4:
1003
1005
  callbacks === null || callbacks === void 0 ? void 0 : (_callbacks$beforeSess = callbacks.beforeSessionExpiry) === null || _callbacks$beforeSess === void 0 ? void 0 : _callbacks$beforeSess.call(callbacks, {
1004
1006
  sessionKey: sessionKey
1005
1007
  });
1006
1008
  if (!(masterConfig !== null && masterConfig !== void 0 && (_masterConfig$auth50 = masterConfig.auth) !== null && _masterConfig$auth50 !== void 0 && _masterConfig$auth50.autoRefreshSession)) {
1007
- _context110.n = 5;
1009
+ _context113.n = 5;
1008
1010
  break;
1009
1011
  }
1010
- _context110.n = 5;
1012
+ _context113.n = 5;
1011
1013
  return refreshSession({
1012
1014
  expirationSeconds: session.expirationSeconds,
1013
1015
  sessionKey: sessionKey
1014
1016
  });
1015
1017
  case 5:
1016
- return _context110.a(2);
1018
+ return _context113.a(2);
1017
1019
  }
1018
- }, _callee110);
1020
+ }, _callee113);
1019
1021
  }));
1020
1022
  return function beforeExpiry() {
1021
- return _ref139.apply(this, arguments);
1023
+ return _ref142.apply(this, arguments);
1022
1024
  };
1023
1025
  }();
1024
1026
  expireSession = /*#__PURE__*/function () {
1025
- var _ref140 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee111() {
1027
+ var _ref143 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee114() {
1026
1028
  var _callbacks$onSessionE;
1027
- var expiredSession, _t33, _t34;
1028
- return _regenerator().w(function (_context111) {
1029
- while (1) switch (_context111.n) {
1029
+ var expiredSession, _t36, _t37;
1030
+ return _regenerator().w(function (_context114) {
1031
+ while (1) switch (_context114.n) {
1030
1032
  case 0:
1031
- _context111.n = 1;
1033
+ _context114.n = 1;
1032
1034
  return getSession({
1033
1035
  sessionKey: sessionKey
1034
1036
  });
1035
1037
  case 1:
1036
- expiredSession = _context111.v;
1038
+ expiredSession = _context114.v;
1037
1039
  if (expiredSession) {
1038
- _context111.n = 2;
1040
+ _context114.n = 2;
1039
1041
  break;
1040
1042
  }
1041
- return _context111.a(2);
1043
+ return _context114.a(2);
1042
1044
  case 2:
1043
1045
  callbacks === null || callbacks === void 0 ? void 0 : (_callbacks$onSessionE = callbacks.onSessionExpired) === null || _callbacks$onSessionE === void 0 ? void 0 : _callbacks$onSessionE.call(callbacks, {
1044
1046
  sessionKey: sessionKey
1045
1047
  });
1046
- _context111.n = 3;
1048
+ _context114.n = 3;
1047
1049
  return getActiveSessionKey();
1048
1050
  case 3:
1049
- _t33 = _context111.v;
1050
- _t34 = sessionKey;
1051
- if (!(_t33 === _t34)) {
1052
- _context111.n = 4;
1051
+ _t36 = _context114.v;
1052
+ _t37 = sessionKey;
1053
+ if (!(_t36 === _t37)) {
1054
+ _context114.n = 4;
1053
1055
  break;
1054
1056
  }
1055
1057
  setSession(undefined);
@@ -1060,7 +1062,7 @@ var ClientProvider = function ClientProvider(_ref) {
1060
1062
  delete next[sessionKey];
1061
1063
  return next;
1062
1064
  });
1063
- _context111.n = 5;
1065
+ _context114.n = 5;
1064
1066
  return clearSession({
1065
1067
  sessionKey: sessionKey
1066
1068
  });
@@ -1068,25 +1070,25 @@ var ClientProvider = function ClientProvider(_ref) {
1068
1070
  // Remove timers for this session
1069
1071
  clearKey(expiryTimeoutsRef.current, sessionKey);
1070
1072
  clearKey(expiryTimeoutsRef.current, warnKey);
1071
- _context111.n = 6;
1073
+ _context114.n = 6;
1072
1074
  return logout();
1073
1075
  case 6:
1074
- return _context111.a(2);
1076
+ return _context114.a(2);
1075
1077
  }
1076
- }, _callee111);
1078
+ }, _callee114);
1077
1079
  }));
1078
1080
  return function expireSession() {
1079
- return _ref140.apply(this, arguments);
1081
+ return _ref143.apply(this, arguments);
1080
1082
  };
1081
1083
  }(); // Already expired → expire immediately
1082
1084
  if (!(timeUntilExpiry <= 0)) {
1083
- _context112.n = 3;
1085
+ _context115.n = 3;
1084
1086
  break;
1085
1087
  }
1086
- _context112.n = 2;
1088
+ _context115.n = 2;
1087
1089
  return expireSession();
1088
1090
  case 2:
1089
- return _context112.a(2);
1091
+ return _context115.a(2);
1090
1092
  case 3:
1091
1093
  // Warning timer (if threshold is in the future)
1092
1094
  warnAt = expiryMs - SESSION_WARNING_THRESHOLD_MS;
@@ -1097,20 +1099,20 @@ var ClientProvider = function ClientProvider(_ref) {
1097
1099
  }
1098
1100
  // Actual expiry timer (safe for long delays)
1099
1101
  setCappedTimeoutInMap(expiryTimeoutsRef.current, sessionKey, expireSession, timeUntilExpiry);
1100
- _context112.n = 5;
1102
+ _context115.n = 5;
1101
1103
  break;
1102
1104
  case 4:
1103
- _context112.p = 4;
1104
- _t35 = _context112.v;
1105
- if (_t35 instanceof TurnkeyError || _t35 instanceof TurnkeyNetworkError) {
1106
- callbacks === null || callbacks === void 0 ? void 0 : (_callbacks$onError0 = callbacks.onError) === null || _callbacks$onError0 === void 0 ? void 0 : _callbacks$onError0.call(callbacks, _t35);
1105
+ _context115.p = 4;
1106
+ _t38 = _context115.v;
1107
+ if (_t38 instanceof TurnkeyError || _t38 instanceof TurnkeyNetworkError) {
1108
+ callbacks === null || callbacks === void 0 ? void 0 : (_callbacks$onError0 = callbacks.onError) === null || _callbacks$onError0 === void 0 ? void 0 : _callbacks$onError0.call(callbacks, _t38);
1107
1109
  } else {
1108
- callbacks === null || callbacks === void 0 ? void 0 : (_callbacks$onError1 = callbacks.onError) === null || _callbacks$onError1 === void 0 ? void 0 : _callbacks$onError1.call(callbacks, new TurnkeyError("Failed to schedule session expiration for ".concat(sessionKey), TurnkeyErrorCodes.SCHEDULE_SESSION_EXPIRY_ERROR, _t35));
1110
+ callbacks === null || callbacks === void 0 ? void 0 : (_callbacks$onError1 = callbacks.onError) === null || _callbacks$onError1 === void 0 ? void 0 : _callbacks$onError1.call(callbacks, new TurnkeyError("Failed to schedule session expiration for ".concat(sessionKey), TurnkeyErrorCodes.SCHEDULE_SESSION_EXPIRY_ERROR, _t38));
1109
1111
  }
1110
1112
  case 5:
1111
- return _context112.a(2);
1113
+ return _context115.a(2);
1112
1114
  }
1113
- }, _callee112, null, [[1, 4]]);
1115
+ }, _callee115, null, [[1, 4]]);
1114
1116
  }));
1115
1117
  return _scheduleSessionExpiration.apply(this, arguments);
1116
1118
  }
@@ -4602,17 +4604,17 @@ var ClientProvider = function ClientProvider(_ref) {
4602
4604
  }(), [pushPage, masterConfig, client, session, user]);
4603
4605
  var handleImportWallet = useCallback(/*#__PURE__*/function () {
4604
4606
  var _ref104 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee82(params) {
4605
- var _ref105, defaultWalletAccounts, _ref105$successPageDu, successPageDuration, stampWith, walletName, organizationId, userId, _t14;
4607
+ var _ref105, defaultWalletAccounts, _ref105$successPageDu, successPageDuration, stampWith, walletName, clearClipboardOnPaste, organizationId, userId, _t14;
4606
4608
  return _regenerator().w(function (_context82) {
4607
4609
  while (1) switch (_context82.p = _context82.n) {
4608
4610
  case 0:
4609
- _ref105 = params || {}, defaultWalletAccounts = _ref105.defaultWalletAccounts, _ref105$successPageDu = _ref105.successPageDuration, successPageDuration = _ref105$successPageDu === void 0 ? 2000 : _ref105$successPageDu, stampWith = _ref105.stampWith, walletName = _ref105.walletName, organizationId = _ref105.organizationId, userId = _ref105.userId;
4611
+ _ref105 = params || {}, defaultWalletAccounts = _ref105.defaultWalletAccounts, _ref105$successPageDu = _ref105.successPageDuration, successPageDuration = _ref105$successPageDu === void 0 ? 2000 : _ref105$successPageDu, stampWith = _ref105.stampWith, walletName = _ref105.walletName, clearClipboardOnPaste = _ref105.clearClipboardOnPaste, organizationId = _ref105.organizationId, userId = _ref105.userId;
4610
4612
  _context82.p = 1;
4611
4613
  return _context82.a(2, withTurnkeyErrorHandling(function () {
4612
4614
  return new Promise(function (resolve, reject) {
4613
4615
  return pushPage({
4614
4616
  key: "Import wallet",
4615
- content: jsx(ImportComponent, _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({
4617
+ content: jsx(ImportComponent, _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({
4616
4618
  importType: ImportType.Wallet,
4617
4619
  onError: function onError(error) {
4618
4620
  reject(error);
@@ -4624,6 +4626,8 @@ var ClientProvider = function ClientProvider(_ref) {
4624
4626
  defaultWalletAccounts: defaultWalletAccounts
4625
4627
  }), successPageDuration !== undefined && {
4626
4628
  successPageDuration: successPageDuration
4629
+ }), clearClipboardOnPaste !== undefined && {
4630
+ clearClipboardOnPaste: clearClipboardOnPaste // Note: This is defaulted to true in the IframeStamper
4627
4631
  }), stampWith !== undefined && {
4628
4632
  stampWith: stampWith
4629
4633
  }), walletName !== undefined && {
@@ -4659,17 +4663,17 @@ var ClientProvider = function ClientProvider(_ref) {
4659
4663
  }(), [pushPage, masterConfig, client, session, user]);
4660
4664
  var handleImportPrivateKey = useCallback(/*#__PURE__*/function () {
4661
4665
  var _ref106 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee83(params) {
4662
- var _ref107, curve, addressFormats, _ref107$successPageDu, successPageDuration, stampWith, keyName, organizationId, _t15;
4666
+ var _ref107, curve, addressFormats, _ref107$successPageDu, successPageDuration, stampWith, keyName, clearClipboardOnPaste, organizationId, _t15;
4663
4667
  return _regenerator().w(function (_context83) {
4664
4668
  while (1) switch (_context83.p = _context83.n) {
4665
4669
  case 0:
4666
- _ref107 = params || {}, curve = _ref107.curve, addressFormats = _ref107.addressFormats, _ref107$successPageDu = _ref107.successPageDuration, successPageDuration = _ref107$successPageDu === void 0 ? 2000 : _ref107$successPageDu, stampWith = _ref107.stampWith, keyName = _ref107.keyName, organizationId = _ref107.organizationId;
4670
+ _ref107 = params || {}, curve = _ref107.curve, addressFormats = _ref107.addressFormats, _ref107$successPageDu = _ref107.successPageDuration, successPageDuration = _ref107$successPageDu === void 0 ? 2000 : _ref107$successPageDu, stampWith = _ref107.stampWith, keyName = _ref107.keyName, clearClipboardOnPaste = _ref107.clearClipboardOnPaste, organizationId = _ref107.organizationId;
4667
4671
  _context83.p = 1;
4668
4672
  return _context83.a(2, withTurnkeyErrorHandling(function () {
4669
4673
  return new Promise(function (resolve, reject) {
4670
4674
  return pushPage({
4671
4675
  key: "Import private key",
4672
- content: jsx(ImportComponent, _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({
4676
+ content: jsx(ImportComponent, _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({
4673
4677
  importType: ImportType.PrivateKey,
4674
4678
  curve: curve,
4675
4679
  addressFormats: addressFormats,
@@ -4681,6 +4685,8 @@ var ClientProvider = function ClientProvider(_ref) {
4681
4685
  }
4682
4686
  }, successPageDuration !== undefined && {
4683
4687
  successPageDuration: successPageDuration
4688
+ }), clearClipboardOnPaste !== undefined && {
4689
+ clearClipboardOnPaste: clearClipboardOnPaste // Note: This is defaulted to true in the IframeStamper
4684
4690
  }), stampWith !== undefined && {
4685
4691
  stampWith: stampWith
4686
4692
  }), keyName !== undefined && {
@@ -6087,26 +6093,269 @@ var ClientProvider = function ClientProvider(_ref) {
6087
6093
  return _ref129.apply(this, arguments);
6088
6094
  };
6089
6095
  }(), [pushPage, masterConfig, client, session, user]);
6096
+ var handleOnRamp = useCallback(/*#__PURE__*/function () {
6097
+ var _ref131 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee104(params) {
6098
+ var _walletAccount$addres;
6099
+ var walletAccount, fiatCurrencyAmount, fiatCurrencyCode, paymentMethod, countrySubdivisionCode, urlForSignature, countryCode, _params$onrampProvide, onrampProvider, _params$sandboxMode, sandboxMode, _params$successPageDu5, successPageDuration, _params$openInNewTab, openInNewTab, s, organizationId, cryptoCurrencyCode, network, openNewTab, _t33;
6100
+ return _regenerator().w(function (_context104) {
6101
+ while (1) switch (_context104.n) {
6102
+ case 0:
6103
+ walletAccount = params.walletAccount, fiatCurrencyAmount = params.fiatCurrencyAmount, fiatCurrencyCode = params.fiatCurrencyCode, paymentMethod = params.paymentMethod, countrySubdivisionCode = params.countrySubdivisionCode, urlForSignature = params.urlForSignature, countryCode = params.countryCode, _params$onrampProvide = params.onrampProvider, onrampProvider = _params$onrampProvide === void 0 ? "FIAT_ON_RAMP_PROVIDER_MOONPAY" : _params$onrampProvide, _params$sandboxMode = params.sandboxMode, sandboxMode = _params$sandboxMode === void 0 ? true : _params$sandboxMode, _params$successPageDu5 = params.successPageDuration, successPageDuration = _params$successPageDu5 === void 0 ? 2000 : _params$successPageDu5, _params$openInNewTab = params.openInNewTab, openInNewTab = _params$openInNewTab === void 0 ? false : _params$openInNewTab;
6104
+ _context104.n = 1;
6105
+ return getSession();
6106
+ case 1:
6107
+ s = _context104.v;
6108
+ organizationId = (params === null || params === void 0 ? void 0 : params.organizationId) || (s === null || s === void 0 ? void 0 : s.organizationId);
6109
+ if (organizationId) {
6110
+ _context104.n = 2;
6111
+ break;
6112
+ }
6113
+ throw new TurnkeyError("A session or passed in organization ID is required.", TurnkeyErrorCodes.INVALID_REQUEST);
6114
+ case 2:
6115
+ _t33 = true;
6116
+ _context104.n = _t33 === (walletAccount.addressFormat === "ADDRESS_FORMAT_ETHEREUM") ? 3 : _t33 === ((_walletAccount$addres = walletAccount.addressFormat) === null || _walletAccount$addres === void 0 ? void 0 : _walletAccount$addres.includes("ADDRESS_FORMAT_BITCOIN")) ? 4 : _t33 === (walletAccount.addressFormat === "ADDRESS_FORMAT_SOLANA") ? 5 : 6;
6117
+ break;
6118
+ case 3:
6119
+ cryptoCurrencyCode = FiatOnRampCryptoCurrency.ETHEREUM;
6120
+ network = FiatOnRampBlockchainNetwork.ETHEREUM;
6121
+ return _context104.a(3, 7);
6122
+ case 4:
6123
+ cryptoCurrencyCode = FiatOnRampCryptoCurrency.BITCOIN;
6124
+ network = FiatOnRampBlockchainNetwork.BITCOIN;
6125
+ return _context104.a(3, 7);
6126
+ case 5:
6127
+ cryptoCurrencyCode = FiatOnRampCryptoCurrency.SOLANA;
6128
+ network = FiatOnRampBlockchainNetwork.SOLANA;
6129
+ return _context104.a(3, 7);
6130
+ case 6:
6131
+ cryptoCurrencyCode = FiatOnRampCryptoCurrency.ETHEREUM;
6132
+ network = FiatOnRampBlockchainNetwork.ETHEREUM;
6133
+ return _context104.a(3, 7);
6134
+ case 7:
6135
+ openNewTab = openInNewTab || isMobile;
6136
+ cryptoCurrencyCode = params.cryptoCurrencyCode || cryptoCurrencyCode;
6137
+ network = params.network || network;
6138
+ return _context104.a(2, new Promise(function (resolve, reject) {
6139
+ var OnRampContainer = function OnRampContainer() {
6140
+ var _useState15 = useState(false),
6141
+ _useState16 = _slicedToArray(_useState15, 2),
6142
+ completed = _useState16[0],
6143
+ setCompleted = _useState16[1];
6144
+ var pollingRef = useRef(null);
6145
+ var cleanup = function cleanup() {
6146
+ if (pollingRef.current) {
6147
+ clearInterval(pollingRef.current);
6148
+ pollingRef.current = null;
6149
+ }
6150
+ };
6151
+ useEffect(function () {
6152
+ return function () {
6153
+ cleanup();
6154
+ };
6155
+ }, []);
6156
+ var action = /*#__PURE__*/function () {
6157
+ var _ref132 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee103() {
6158
+ var _client$httpClient, onRampWindow, result, _popupWidth, _popupHeight, left, top, onRampTransactionId, _t32;
6159
+ return _regenerator().w(function (_context103) {
6160
+ while (1) switch (_context103.p = _context103.n) {
6161
+ case 0:
6162
+ _context103.p = 0;
6163
+ onRampWindow = null;
6164
+ if (!openNewTab) {
6165
+ _context103.n = 1;
6166
+ break;
6167
+ }
6168
+ onRampWindow = window.open("", "_blank");
6169
+ if (onRampWindow) {
6170
+ _context103.n = 1;
6171
+ break;
6172
+ }
6173
+ throw new Error("Failed to open On Ramp tab.");
6174
+ case 1:
6175
+ _context103.n = 2;
6176
+ return client === null || client === void 0 ? void 0 : (_client$httpClient = client.httpClient) === null || _client$httpClient === void 0 ? void 0 : _client$httpClient.initFiatOnRamp(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({
6177
+ onrampProvider: onrampProvider,
6178
+ walletAddress: walletAccount.address,
6179
+ network: network,
6180
+ cryptoCurrencyCode: cryptoCurrencyCode,
6181
+ sandboxMode: sandboxMode,
6182
+ organizationId: organizationId
6183
+ }, fiatCurrencyCode ? {
6184
+ fiatCurrencyCode: fiatCurrencyCode
6185
+ } : {}), fiatCurrencyAmount ? {
6186
+ fiatCurrencyAmount: fiatCurrencyAmount
6187
+ } : {}), paymentMethod ? {
6188
+ paymentMethod: paymentMethod
6189
+ } : {}), countryCode ? {
6190
+ countryCode: countryCode
6191
+ } : {}), countrySubdivisionCode ? {
6192
+ countrySubdivisionCode: countrySubdivisionCode
6193
+ } : {}), sandboxMode !== undefined ? {
6194
+ sandboxMode: sandboxMode
6195
+ } : {}), urlForSignature ? {
6196
+ urlForSignature: urlForSignature
6197
+ } : {}));
6198
+ case 2:
6199
+ result = _context103.v;
6200
+ if (result !== null && result !== void 0 && result.onRampUrl) {
6201
+ _context103.n = 3;
6202
+ break;
6203
+ }
6204
+ throw new Error("Missing onRampUrl");
6205
+ case 3:
6206
+ if (!(openNewTab && onRampWindow)) {
6207
+ _context103.n = 4;
6208
+ break;
6209
+ }
6210
+ onRampWindow.location.href = result.onRampUrl.toString();
6211
+ _context103.n = 5;
6212
+ break;
6213
+ case 4:
6214
+ _popupWidth = 500;
6215
+ _popupHeight = 600;
6216
+ left = window.screenX + (window.innerWidth - _popupWidth) / 2;
6217
+ top = window.screenY + (window.innerHeight - _popupHeight) / 2;
6218
+ onRampWindow = window.open(result.onRampUrl.toString(), "_blank", "width=".concat(_popupWidth, ",height=").concat(_popupHeight, ",top=").concat(top, ",left=").concat(left, ",scrollbars=yes,resizable=yes"));
6219
+ if (onRampWindow) {
6220
+ _context103.n = 5;
6221
+ break;
6222
+ }
6223
+ throw new Error("Failed to open On Ramp window.");
6224
+ case 5:
6225
+ onRampTransactionId = result.onRampTransactionId;
6226
+ if (onRampTransactionId) {
6227
+ _context103.n = 6;
6228
+ break;
6229
+ }
6230
+ throw new Error("No onRampTransactionId returned");
6231
+ case 6:
6232
+ return _context103.a(2, new Promise(function (resolveAction, rejectAction) {
6233
+ pollingRef.current = setInterval(/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee102() {
6234
+ var _onRampWindow, _client$httpClient2, currentUrl, _onRampWindow2, _onRampWindow3, resp, status, _onRampWindow4, _t31;
6235
+ return _regenerator().w(function (_context102) {
6236
+ while (1) switch (_context102.p = _context102.n) {
6237
+ case 0:
6238
+ _context102.p = 0;
6239
+ if (!(onrampProvider === "FIAT_ON_RAMP_PROVIDER_COINBASE" && (_onRampWindow = onRampWindow) !== null && _onRampWindow !== void 0 && _onRampWindow.closed)) {
6240
+ _context102.n = 1;
6241
+ break;
6242
+ }
6243
+ cleanup();
6244
+ rejectAction(new Error("On-ramp popup closed by user"));
6245
+ return _context102.a(2);
6246
+ case 1:
6247
+ currentUrl = "";
6248
+ try {
6249
+ currentUrl = ((_onRampWindow2 = onRampWindow) === null || _onRampWindow2 === void 0 ? void 0 : _onRampWindow2.location.href) || "";
6250
+ } catch (_unused3) {}
6251
+ if (!(currentUrl && currentUrl.startsWith(window.location.origin))) {
6252
+ _context102.n = 2;
6253
+ break;
6254
+ }
6255
+ cleanup();
6256
+ (_onRampWindow3 = onRampWindow) === null || _onRampWindow3 === void 0 ? void 0 : _onRampWindow3.close();
6257
+ setCompleted(true);
6258
+ resolveAction();
6259
+ return _context102.a(2);
6260
+ case 2:
6261
+ _context102.n = 3;
6262
+ return client === null || client === void 0 ? void 0 : (_client$httpClient2 = client.httpClient) === null || _client$httpClient2 === void 0 ? void 0 : _client$httpClient2.getOnRampTransactionStatus({
6263
+ transactionId: onRampTransactionId,
6264
+ refresh: true
6265
+ });
6266
+ case 3:
6267
+ resp = _context102.v;
6268
+ status = resp === null || resp === void 0 ? void 0 : resp.transactionStatus;
6269
+ if (["COMPLETED", "FAILED", "CANCELLED"].includes(status !== null && status !== void 0 ? status : "")) {
6270
+ cleanup();
6271
+ try {
6272
+ (_onRampWindow4 = onRampWindow) === null || _onRampWindow4 === void 0 ? void 0 : _onRampWindow4.close();
6273
+ } catch (_unused4) {}
6274
+ setCompleted(true);
6275
+ resolveAction();
6276
+ }
6277
+ _context102.n = 5;
6278
+ break;
6279
+ case 4:
6280
+ _context102.p = 4;
6281
+ _t31 = _context102.v;
6282
+ console.warn("Polling error (ignored):", _t31);
6283
+ case 5:
6284
+ return _context102.a(2);
6285
+ }
6286
+ }, _callee102, null, [[0, 4]]);
6287
+ })), 3000);
6288
+ }));
6289
+ case 7:
6290
+ _context103.p = 7;
6291
+ _t32 = _context103.v;
6292
+ cleanup();
6293
+ throw _t32;
6294
+ case 8:
6295
+ return _context103.a(2);
6296
+ }
6297
+ }, _callee103, null, [[0, 7]]);
6298
+ }));
6299
+ return function action() {
6300
+ return _ref132.apply(this, arguments);
6301
+ };
6302
+ }();
6303
+ return jsx(OnRampPage, {
6304
+ icon: onrampProvider === "FIAT_ON_RAMP_PROVIDER_COINBASE" ? jsx(CoinbaseLogo, {
6305
+ className: "w-12 h-12"
6306
+ }) : jsx(MoonPayLogo, {
6307
+ className: "w-12 h-12"
6308
+ }),
6309
+ onrampProvider: onrampProvider,
6310
+ action: action,
6311
+ sandboxMode: sandboxMode,
6312
+ completed: completed,
6313
+ successPageDuration: successPageDuration,
6314
+ onSuccess: function onSuccess() {
6315
+ return resolve();
6316
+ },
6317
+ onError: function onError(err) {
6318
+ return reject(err);
6319
+ }
6320
+ });
6321
+ };
6322
+ pushPage({
6323
+ key: "Fiat OnRamp",
6324
+ content: jsx(OnRampContainer, {}),
6325
+ showTitle: false,
6326
+ preventBack: true,
6327
+ onClose: function onClose() {
6328
+ return reject(new TurnkeyError("User canceled the onramp process.", TurnkeyErrorCodes.USER_CANCELED));
6329
+ }
6330
+ });
6331
+ }));
6332
+ }
6333
+ }, _callee104);
6334
+ }));
6335
+ return function (_x91) {
6336
+ return _ref131.apply(this, arguments);
6337
+ };
6338
+ }(), [pushPage, client]);
6090
6339
  var handleVerifyAppProofs = useCallback(/*#__PURE__*/function () {
6091
- var _ref131 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee102(params) {
6092
- var _ref132, appProofs, _ref132$successPageDu, successPageDuration, stampWith, s, organizationId, _t31;
6093
- return _regenerator().w(function (_context102) {
6094
- while (1) switch (_context102.p = _context102.n) {
6340
+ var _ref134 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee105(params) {
6341
+ var _ref135, appProofs, _ref135$successPageDu, successPageDuration, stampWith, s, organizationId, _t34;
6342
+ return _regenerator().w(function (_context105) {
6343
+ while (1) switch (_context105.p = _context105.n) {
6095
6344
  case 0:
6096
- _ref132 = params || {}, appProofs = _ref132.appProofs, _ref132$successPageDu = _ref132.successPageDuration, successPageDuration = _ref132$successPageDu === void 0 ? 3000 : _ref132$successPageDu, stampWith = _ref132.stampWith;
6097
- _context102.n = 1;
6345
+ _ref135 = params || {}, appProofs = _ref135.appProofs, _ref135$successPageDu = _ref135.successPageDuration, successPageDuration = _ref135$successPageDu === void 0 ? 3000 : _ref135$successPageDu, stampWith = _ref135.stampWith;
6346
+ _context105.n = 1;
6098
6347
  return getSession();
6099
6348
  case 1:
6100
- s = _context102.v;
6349
+ s = _context105.v;
6101
6350
  organizationId = (params === null || params === void 0 ? void 0 : params.organizationId) || (s === null || s === void 0 ? void 0 : s.organizationId);
6102
6351
  if (organizationId) {
6103
- _context102.n = 2;
6352
+ _context105.n = 2;
6104
6353
  break;
6105
6354
  }
6106
6355
  throw new TurnkeyError("A session or passed in organization ID is required.", TurnkeyErrorCodes.INVALID_REQUEST);
6107
6356
  case 2:
6108
- _context102.p = 2;
6109
- return _context102.a(2, new Promise(function (resolve, reject) {
6357
+ _context105.p = 2;
6358
+ return _context105.a(2, new Promise(function (resolve, reject) {
6110
6359
  pushPage({
6111
6360
  key: "Verify app proofs",
6112
6361
  showTurnkeyBranding: false,
@@ -6132,58 +6381,58 @@ var ClientProvider = function ClientProvider(_ref) {
6132
6381
  });
6133
6382
  }));
6134
6383
  case 3:
6135
- _context102.p = 3;
6136
- _t31 = _context102.v;
6137
- if (!(_t31 instanceof TurnkeyError)) {
6138
- _context102.n = 4;
6384
+ _context105.p = 3;
6385
+ _t34 = _context105.v;
6386
+ if (!(_t34 instanceof TurnkeyError)) {
6387
+ _context105.n = 4;
6139
6388
  break;
6140
6389
  }
6141
- throw _t31;
6390
+ throw _t34;
6142
6391
  case 4:
6143
- throw new TurnkeyError("Failed to verify app proofs.", TurnkeyErrorCodes.VERIFY_APP_PROOFS_ERROR, _t31);
6392
+ throw new TurnkeyError("Failed to verify app proofs.", TurnkeyErrorCodes.VERIFY_APP_PROOFS_ERROR, _t34);
6144
6393
  case 5:
6145
- return _context102.a(2);
6394
+ return _context105.a(2);
6146
6395
  }
6147
- }, _callee102, null, [[2, 3]]);
6396
+ }, _callee105, null, [[2, 3]]);
6148
6397
  }));
6149
- return function (_x91) {
6150
- return _ref131.apply(this, arguments);
6398
+ return function (_x92) {
6399
+ return _ref134.apply(this, arguments);
6151
6400
  };
6152
6401
  }(), [pushPage, client]);
6153
6402
  useEffect(function () {
6154
6403
  if (proxyAuthConfigRef.current) return;
6155
6404
  // Only fetch the proxy auth config once. Use that to build the master config.
6156
6405
  var fetchProxyAuthConfig = /*#__PURE__*/function () {
6157
- var _ref133 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee103() {
6406
+ var _ref136 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee106() {
6158
6407
  var proxyAuthConfig;
6159
- return _regenerator().w(function (_context103) {
6160
- while (1) switch (_context103.p = _context103.n) {
6408
+ return _regenerator().w(function (_context106) {
6409
+ while (1) switch (_context106.p = _context106.n) {
6161
6410
  case 0:
6162
- _context103.p = 0;
6411
+ _context106.p = 0;
6163
6412
  if (!config.authProxyConfigId) {
6164
- _context103.n = 2;
6413
+ _context106.n = 2;
6165
6414
  break;
6166
6415
  }
6167
- _context103.n = 1;
6416
+ _context106.n = 1;
6168
6417
  return getAuthProxyConfig(config.authProxyConfigId, config.authProxyUrl);
6169
6418
  case 1:
6170
- proxyAuthConfig = _context103.v;
6419
+ proxyAuthConfig = _context106.v;
6171
6420
  proxyAuthConfigRef.current = proxyAuthConfig;
6172
6421
  case 2:
6173
6422
  setMasterConfig(buildConfig(proxyAuthConfig));
6174
- _context103.n = 4;
6423
+ _context106.n = 4;
6175
6424
  break;
6176
6425
  case 3:
6177
- _context103.p = 3;
6178
- _context103.v;
6426
+ _context106.p = 3;
6427
+ _context106.v;
6179
6428
  setClientState(ClientState.Error);
6180
6429
  case 4:
6181
- return _context103.a(2);
6430
+ return _context106.a(2);
6182
6431
  }
6183
- }, _callee103, null, [[0, 3]]);
6432
+ }, _callee106, null, [[0, 3]]);
6184
6433
  }));
6185
6434
  return function fetchProxyAuthConfig() {
6186
- return _ref133.apply(this, arguments);
6435
+ return _ref136.apply(this, arguments);
6187
6436
  };
6188
6437
  }();
6189
6438
  fetchProxyAuthConfig();
@@ -6215,29 +6464,29 @@ var ClientProvider = function ClientProvider(_ref) {
6215
6464
  useEffect(function () {
6216
6465
  if (!client) return;
6217
6466
  var handleUpdateState = /*#__PURE__*/function () {
6218
- var _ref134 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee104() {
6219
- return _regenerator().w(function (_context104) {
6220
- while (1) switch (_context104.n) {
6467
+ var _ref137 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee107() {
6468
+ return _regenerator().w(function (_context107) {
6469
+ while (1) switch (_context107.n) {
6221
6470
  case 0:
6222
6471
  if (!session) {
6223
- _context104.n = 2;
6472
+ _context107.n = 2;
6224
6473
  break;
6225
6474
  }
6226
- _context104.n = 1;
6475
+ _context107.n = 1;
6227
6476
  return debouncedRefreshWallets();
6228
6477
  case 1:
6229
- _context104.n = 3;
6478
+ _context107.n = 3;
6230
6479
  break;
6231
6480
  case 2:
6232
- _context104.n = 3;
6481
+ _context107.n = 3;
6233
6482
  return debouncedFetchWalletProviders();
6234
6483
  case 3:
6235
- return _context104.a(2);
6484
+ return _context107.a(2);
6236
6485
  }
6237
- }, _callee104);
6486
+ }, _callee107);
6238
6487
  }));
6239
6488
  return function handleUpdateState() {
6240
- return _ref134.apply(this, arguments);
6489
+ return _ref137.apply(this, arguments);
6241
6490
  };
6242
6491
  }();
6243
6492
  var cleanup = function cleanup() {};
@@ -6376,7 +6625,8 @@ var ClientProvider = function ClientProvider(_ref) {
6376
6625
  handleConnectExternalWallet: handleConnectExternalWallet,
6377
6626
  handleRemoveUserEmail: handleRemoveUserEmail,
6378
6627
  handleRemoveUserPhoneNumber: handleRemoveUserPhoneNumber,
6379
- handleVerifyAppProofs: handleVerifyAppProofs
6628
+ handleVerifyAppProofs: handleVerifyAppProofs,
6629
+ handleOnRamp: handleOnRamp
6380
6630
  },
6381
6631
  children: children
6382
6632
  });