@swype-org/react-sdk 0.1.127 → 0.1.128

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1976,7 +1976,8 @@ function createInitialState(config) {
1976
1976
  oneTapLimit: 100,
1977
1977
  mobileFlow: false,
1978
1978
  deeplinkUri: null,
1979
- increasingLimit: false
1979
+ increasingLimit: false,
1980
+ previousStep: null
1980
1981
  };
1981
1982
  }
1982
1983
  function paymentReducer(state, action) {
@@ -2200,7 +2201,7 @@ function paymentReducer(state, action) {
2200
2201
  };
2201
2202
  // ── Navigation & error ───────────────────────────────────────
2202
2203
  case "NAVIGATE":
2203
- return { ...state, step: action.step, error: null };
2204
+ return { ...state, step: action.step, previousStep: state.step, error: null };
2204
2205
  case "SET_ERROR":
2205
2206
  return { ...state, error: action.error };
2206
2207
  // ── Lifecycle ────────────────────────────────────────────────
@@ -5622,6 +5623,8 @@ function StepRenderer({
5622
5623
  handlers
5623
5624
  }) {
5624
5625
  const { step } = state;
5626
+ const selectedWallet = selectedAccount?.wallets.find((w) => w.id === state.selectedWalletId);
5627
+ const selectedSourceLabel = selectedSource && selectedWallet ? `${selectedSource.token.symbol} on ${selectedWallet.chain.name}` : void 0;
5625
5628
  if (!ready) {
5626
5629
  return /* @__PURE__ */ jsx(SwypeLoadingScreen, {});
5627
5630
  }
@@ -5737,6 +5740,8 @@ function StepRenderer({
5737
5740
  onSetupOneTap: handlers.onSetupOneTap,
5738
5741
  onBack: () => handlers.onNavigate("deposit"),
5739
5742
  onLogout: handlers.onLogout,
5743
+ onAdvanced: handlers.onSelectToken,
5744
+ selectedSourceLabel,
5740
5745
  loading: savingOneTapLimit,
5741
5746
  error: state.error
5742
5747
  }
@@ -5799,7 +5804,7 @@ function StepRenderer({
5799
5804
  chains: state.chains,
5800
5805
  onSelectAuthorized: handlers.onSelectAuthorizedToken,
5801
5806
  onAuthorizeToken: handlers.onAuthorizeToken,
5802
- onBack: () => handlers.onNavigate("deposit")
5807
+ onBack: () => handlers.onNavigate(state.previousStep === "setup" ? "setup" : "deposit")
5803
5808
  }
5804
5809
  );
5805
5810
  }