@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.cjs CHANGED
@@ -1979,7 +1979,8 @@ function createInitialState(config) {
1979
1979
  oneTapLimit: 100,
1980
1980
  mobileFlow: false,
1981
1981
  deeplinkUri: null,
1982
- increasingLimit: false
1982
+ increasingLimit: false,
1983
+ previousStep: null
1983
1984
  };
1984
1985
  }
1985
1986
  function paymentReducer(state, action) {
@@ -2203,7 +2204,7 @@ function paymentReducer(state, action) {
2203
2204
  };
2204
2205
  // ── Navigation & error ───────────────────────────────────────
2205
2206
  case "NAVIGATE":
2206
- return { ...state, step: action.step, error: null };
2207
+ return { ...state, step: action.step, previousStep: state.step, error: null };
2207
2208
  case "SET_ERROR":
2208
2209
  return { ...state, error: action.error };
2209
2210
  // ── Lifecycle ────────────────────────────────────────────────
@@ -5625,6 +5626,8 @@ function StepRenderer({
5625
5626
  handlers
5626
5627
  }) {
5627
5628
  const { step } = state;
5629
+ const selectedWallet = selectedAccount?.wallets.find((w) => w.id === state.selectedWalletId);
5630
+ const selectedSourceLabel = selectedSource && selectedWallet ? `${selectedSource.token.symbol} on ${selectedWallet.chain.name}` : void 0;
5628
5631
  if (!ready) {
5629
5632
  return /* @__PURE__ */ jsxRuntime.jsx(SwypeLoadingScreen, {});
5630
5633
  }
@@ -5740,6 +5743,8 @@ function StepRenderer({
5740
5743
  onSetupOneTap: handlers.onSetupOneTap,
5741
5744
  onBack: () => handlers.onNavigate("deposit"),
5742
5745
  onLogout: handlers.onLogout,
5746
+ onAdvanced: handlers.onSelectToken,
5747
+ selectedSourceLabel,
5743
5748
  loading: savingOneTapLimit,
5744
5749
  error: state.error
5745
5750
  }
@@ -5802,7 +5807,7 @@ function StepRenderer({
5802
5807
  chains: state.chains,
5803
5808
  onSelectAuthorized: handlers.onSelectAuthorizedToken,
5804
5809
  onAuthorizeToken: handlers.onAuthorizeToken,
5805
- onBack: () => handlers.onNavigate("deposit")
5810
+ onBack: () => handlers.onNavigate(state.previousStep === "setup" ? "setup" : "deposit")
5806
5811
  }
5807
5812
  );
5808
5813
  }