@skip-go/widget 2.2.4 → 2.2.5-alpha.0

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.
@@ -6,4 +6,5 @@ export declare function useSkipConfig(): {
6
6
  getRpcEndpointForChain?: ((chainID: string) => Promise<string>) | undefined;
7
7
  getRestEndpointForChain?: ((chainID: string) => Promise<string>) | undefined;
8
8
  } | undefined;
9
+ makeDestinationWallets: ((chainID: string) => import("./use-make-wallets").MinimalWallet[]) | undefined;
9
10
  };
package/build/index.es.js CHANGED
@@ -308,7 +308,7 @@ function isReadyToCheckLedger(walletClient) {
308
308
  }
309
309
 
310
310
  const SkipContext = createContext(undefined);
311
- function SkipProvider({ children, apiURL, endpointOptions, }) {
311
+ function SkipProvider({ children, apiURL, endpointOptions, makeDestinationWallets, }) {
312
312
  const { getWalletRepo } = useManager();
313
313
  const { wallets } = useWallet();
314
314
  const skipClient = new SkipRouter({
@@ -370,6 +370,7 @@ function SkipProvider({ children, apiURL, endpointOptions, }) {
370
370
  skipClient,
371
371
  apiURL,
372
372
  endpointOptions,
373
+ makeDestinationWallets,
373
374
  }, children: children }));
374
375
  }
375
376
 
@@ -388,6 +389,7 @@ function useSkipConfig() {
388
389
  return {
389
390
  apiURL: context.apiURL,
390
391
  endpointOptions: context.endpointOptions,
392
+ makeDestinationWallets: context.makeDestinationWallets,
391
393
  };
392
394
  }
393
395
 
@@ -1080,8 +1082,8 @@ const apiURL = `${appUrl}/api/widget/skip`;
1080
1082
  const WalletProvider = ({ children }) => {
1081
1083
  return (jsx(SolanaProvider, { children: jsx(CosmosProvider, { children: jsx(EVMProvider, { children: jsx(WalletModalProvider, { children: children }) }) }) }));
1082
1084
  };
1083
- const SkipAPIProvider = ({ children, endpointOptions: endpointOptions$1 = endpointOptions, apiURL: apiURL$1 = apiURL, }) => {
1084
- return (jsx(SkipProvider, { apiURL: apiURL$1, endpointOptions: endpointOptions$1, children: jsx(AssetsProvider, { children: children }) }));
1085
+ const SkipAPIProvider = ({ children, endpointOptions: endpointOptions$1 = endpointOptions, apiURL: apiURL$1 = apiURL, makeDestinationWallets, }) => {
1086
+ return (jsx(SkipProvider, { apiURL: apiURL$1, endpointOptions: endpointOptions$1, makeDestinationWallets: makeDestinationWallets, children: jsx(AssetsProvider, { children: children }) }));
1085
1087
  };
1086
1088
  const SwapWidgetProvider = ({ children, ...skipApiProviderProps }) => {
1087
1089
  return (jsx(WalletProvider, { children: jsx(SkipAPIProvider, { ...skipApiProviderProps, children: children }) }));
@@ -3896,11 +3898,15 @@ const makeStepState = (props) => {
3896
3898
 
3897
3899
  const SetAddressDialog = ({ open, onOpen, chain, index, signRequired, isDestination, chainAddresses, setChainAddresses, }) => {
3898
3900
  const { chainType, chainID, bech32Prefix } = chain;
3901
+ const { makeDestinationWallets } = useSkipConfig();
3899
3902
  const { makeWallets } = useMakeWallets();
3900
- const wallets = makeWallets(chainID);
3903
+ const _wallets = makeWallets(chainID);
3904
+ const destinationWallets = makeDestinationWallets === null || makeDestinationWallets === void 0 ? void 0 : makeDestinationWallets(chainID);
3905
+ const wallets = destinationWallets && destinationWallets.length > 0
3906
+ ? destinationWallets
3907
+ : _wallets;
3901
3908
  const [address, setAddress] = useState('');
3902
3909
  const [isEditing, setIsEditing] = useState(false);
3903
- chainAddresses[index];
3904
3910
  const validateAddress = (address) => {
3905
3911
  if (chainType === 'cosmos') {
3906
3912
  try {