From 27b07b7bc214ee97b2af60a5e9a9f210f9e87e24 Mon Sep 17 00:00:00 2001 From: plam-ml <127577476+plam-ml@users.noreply.github.com> Date: Thu, 10 Oct 2024 12:42:41 -0700 Subject: [PATCH] add source to swap (#19797) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Description Add source for swap wallet address: https://github.com/MystenLabs/apps-backend/blob/main/src/routes/legacy/swap.ts#L85 ![Screenshot 2024-10-10 at 11 02 57 AM](https://github.com/user-attachments/assets/977c2eb8-7109-47c1-8fd8-55521ca58e26) ## Test plan How did you test the new or updated feature? --- ## Release notes Check each box that your changes affect. If none of the boxes relate to your changes, release notes aren't required. For each box you select, include information after the relevant heading that describes the impact of your changes that a user might notice and any actions they must take to implement updates. - [ ] Protocol: - [ ] Nodes (Validators and Full nodes): - [ ] Indexer: - [ ] JSON-RPC: - [ ] GraphQL: - [ ] CLI: - [ ] Rust SDK: - [ ] REST API: --- apps/wallet/src/ui/app/pages/swap/index.tsx | 1 + apps/wallet/src/ui/app/pages/swap/useSwapTransaction.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/apps/wallet/src/ui/app/pages/swap/index.tsx b/apps/wallet/src/ui/app/pages/swap/index.tsx index e22562e13ceb1..93396613d06ab 100644 --- a/apps/wallet/src/ui/app/pages/swap/index.tsx +++ b/apps/wallet/src/ui/app/pages/swap/index.tsx @@ -183,6 +183,7 @@ export function SwapPage() { amount: parsed.toString(), slippage: Number(allowedMaxSlippagePercentage), enabled: isFormValid && parsed > 0n && !!fromCoinType && !!toCoinType, + source: 'sui-wallet', }); const swapData = useMemo(() => { diff --git a/apps/wallet/src/ui/app/pages/swap/useSwapTransaction.ts b/apps/wallet/src/ui/app/pages/swap/useSwapTransaction.ts index 94326c21a9049..b3cdf46d97c8e 100644 --- a/apps/wallet/src/ui/app/pages/swap/useSwapTransaction.ts +++ b/apps/wallet/src/ui/app/pages/swap/useSwapTransaction.ts @@ -8,6 +8,7 @@ export type SwapRequest = { amount: string; fromType?: string; slippage: number; + source: string; sender?: string; toType?: string; };