@b3dotfun/sdk 0.0.38 → 0.0.40-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.
Files changed (43) hide show
  1. package/dist/cjs/anyspend/constants/index.d.ts +0 -1
  2. package/dist/cjs/anyspend/constants/index.js +1 -2
  3. package/dist/cjs/anyspend/react/components/AnySpend.js +5 -6
  4. package/dist/cjs/anyspend/react/components/AnySpendCustom.js +8 -9
  5. package/dist/cjs/anyspend/react/components/AnyspendDepositHype.js +4 -5
  6. package/dist/cjs/anyspend/react/components/common/ConnectWalletPayment.d.ts +2 -1
  7. package/dist/cjs/anyspend/react/components/common/ConnectWalletPayment.js +3 -2
  8. package/dist/cjs/anyspend/react/components/common/OrderDetails.d.ts +2 -0
  9. package/dist/cjs/anyspend/react/components/common/OrderDetails.js +23 -19
  10. package/dist/cjs/anyspend/react/components/common/OrderDetailsCollapsible.js +9 -8
  11. package/dist/cjs/anyspend/react/components/common/PaymentMethodSwitch.d.ts +7 -0
  12. package/dist/cjs/anyspend/react/components/common/PaymentMethodSwitch.js +24 -0
  13. package/dist/cjs/anyspend/react/components/common/TransferCryptoDetails.d.ts +2 -0
  14. package/dist/cjs/anyspend/react/components/common/TransferCryptoDetails.js +6 -4
  15. package/dist/esm/anyspend/constants/index.d.ts +0 -1
  16. package/dist/esm/anyspend/constants/index.js +0 -1
  17. package/dist/esm/anyspend/react/components/AnySpend.js +6 -7
  18. package/dist/esm/anyspend/react/components/AnySpendCustom.js +8 -9
  19. package/dist/esm/anyspend/react/components/AnyspendDepositHype.js +5 -6
  20. package/dist/esm/anyspend/react/components/common/ConnectWalletPayment.d.ts +2 -1
  21. package/dist/esm/anyspend/react/components/common/ConnectWalletPayment.js +3 -2
  22. package/dist/esm/anyspend/react/components/common/OrderDetails.d.ts +2 -0
  23. package/dist/esm/anyspend/react/components/common/OrderDetails.js +24 -20
  24. package/dist/esm/anyspend/react/components/common/OrderDetailsCollapsible.js +10 -9
  25. package/dist/esm/anyspend/react/components/common/PaymentMethodSwitch.d.ts +7 -0
  26. package/dist/esm/anyspend/react/components/common/PaymentMethodSwitch.js +21 -0
  27. package/dist/esm/anyspend/react/components/common/TransferCryptoDetails.d.ts +2 -0
  28. package/dist/esm/anyspend/react/components/common/TransferCryptoDetails.js +6 -4
  29. package/dist/types/anyspend/constants/index.d.ts +0 -1
  30. package/dist/types/anyspend/react/components/common/ConnectWalletPayment.d.ts +2 -1
  31. package/dist/types/anyspend/react/components/common/OrderDetails.d.ts +2 -0
  32. package/dist/types/anyspend/react/components/common/PaymentMethodSwitch.d.ts +7 -0
  33. package/dist/types/anyspend/react/components/common/TransferCryptoDetails.d.ts +2 -0
  34. package/package.json +1 -1
  35. package/src/anyspend/constants/index.ts +0 -2
  36. package/src/anyspend/react/components/AnySpend.tsx +15 -17
  37. package/src/anyspend/react/components/AnySpendCustom.tsx +19 -21
  38. package/src/anyspend/react/components/AnyspendDepositHype.tsx +16 -18
  39. package/src/anyspend/react/components/common/ConnectWalletPayment.tsx +5 -0
  40. package/src/anyspend/react/components/common/OrderDetails.tsx +60 -43
  41. package/src/anyspend/react/components/common/OrderDetailsCollapsible.tsx +62 -41
  42. package/src/anyspend/react/components/common/PaymentMethodSwitch.tsx +38 -0
  43. package/src/anyspend/react/components/common/TransferCryptoDetails.tsx +65 -43
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
 
3
- import { ALL_CHAINS, capitalizeFirstLetter, DEPOSIT_HYPE_ACTION, getChainName } from "@b3dotfun/sdk/anyspend";
3
+ import { ALL_CHAINS, capitalizeFirstLetter, getChainName } from "@b3dotfun/sdk/anyspend";
4
4
  import { components } from "@b3dotfun/sdk/anyspend/types/api";
5
5
  import { CopyToClipboard } from "@b3dotfun/sdk/global-account/react";
6
6
  import { cn } from "@b3dotfun/sdk/shared/utils";
@@ -47,7 +47,8 @@ export const OrderDetailsCollapsible = memo(function OrderDetailsCollapsible({
47
47
  order.type === "mint_nft" ||
48
48
  order.type === "join_tournament" ||
49
49
  order.type === "fund_tournament" ||
50
- order.type === "custom"
50
+ order.type === "custom" ||
51
+ order.type === "hype_duel"
51
52
  ? "0"
52
53
  : order.payload.expectedDstAmount.toString();
53
54
 
@@ -55,79 +56,94 @@ export const OrderDetailsCollapsible = memo(function OrderDetailsCollapsible({
55
56
  formattedExpectedDstAmount || formatTokenAmount(BigInt(expectedDstAmount), dstToken.decimals);
56
57
 
57
58
  return (
58
- <div className={cn("bg-as-surface-secondary border-as-border-secondary rounded-xl border px-4 py-2", className)}>
59
+ <div
60
+ className={cn(
61
+ "order-details-collapsible bg-as-surface-secondary border-as-border-secondary rounded-xl border px-4 py-2",
62
+ className,
63
+ )}
64
+ >
59
65
  {showOrderDetails ? (
60
66
  <motion.div
61
- className="w-full"
67
+ className="order-details-expanded w-full"
62
68
  initial={{ opacity: 0, y: 20, filter: "blur(10px)" }}
63
69
  animate={{ opacity: 1, y: 0, filter: "blur(0px)" }}
64
70
  transition={{ duration: 0.3, delay: 0, ease: "easeInOut" }}
65
71
  >
66
- <div className="flex w-full flex-col items-center gap-3 whitespace-nowrap py-2 text-sm">
72
+ <div className="order-details-content flex w-full flex-col items-center gap-3 whitespace-nowrap py-2 text-sm">
67
73
  {/* Recipient Section */}
68
- <div className="flex w-full justify-between gap-4">
69
- <div className="text-as-tertiarry">Recipient</div>
70
- <div className="flex flex-col items-end gap-1">
71
- {recipientName && <div className="text-as-primary font-semibold">{recipientName}</div>}
74
+ <div className="order-details-recipient-section flex w-full justify-between gap-4">
75
+ <div className="order-details-recipient-label text-as-tertiarry">Recipient</div>
76
+ <div className="order-details-recipient-info flex flex-col items-end gap-1">
77
+ {recipientName && (
78
+ <div className="order-details-recipient-name text-as-primary font-semibold">{recipientName}</div>
79
+ )}
72
80
  <CopyToClipboard
73
81
  text={order.recipientAddress}
74
82
  onCopy={() => {
75
83
  toast.success("Copied recipient address to clipboard");
76
84
  }}
77
85
  >
78
- <div className="text-as-primary flex items-center gap-2">
86
+ <div className="order-details-recipient-address text-as-primary flex items-center gap-2">
79
87
  {centerTruncate(order.recipientAddress, 10)}
80
- <Copy className="text-as-primary/50 hover:text-as-primary h-4 w-4 cursor-pointer transition-all duration-200" />
88
+ <Copy className="order-details-recipient-copy-icon text-as-primary/50 hover:text-as-primary h-4 w-4 cursor-pointer transition-all duration-200" />
81
89
  </div>
82
90
  </CopyToClipboard>
83
91
  </div>
84
92
  </div>
85
- <div className="divider w-full" />
93
+ <div className="order-details-divider divider w-full" />
86
94
 
87
95
  {/* Expected Amount/Action Section */}
88
- <div className="flex w-full items-center justify-between gap-2">
89
- <div className="text-as-tertiarry">
96
+ <div className="order-details-expected-section flex w-full items-center justify-between gap-2">
97
+ <div className="order-details-expected-label text-as-tertiarry">
90
98
  {order.type === "swap" || order.type === "mint_nft"
91
99
  ? "Expected to receive"
92
100
  : order.type === "join_tournament"
93
101
  ? "Join tournament"
94
102
  : order.type === "fund_tournament"
95
103
  ? "Fund tournament"
96
- : order.type === "custom"
97
- ? order.metadata.action === DEPOSIT_HYPE_ACTION
98
- ? "Deposit HYPE"
99
- : order.metadata.action
104
+ : order.type === "hype_duel"
105
+ ? "Deposit HYPE"
106
+ : order.type === "custom"
107
+ ? order.metadata.action
100
108
  ? capitalizeFirstLetter(order.metadata.action)
101
109
  : "Contract execution"
102
- : ""}
110
+ : ""}
103
111
  </div>
104
112
 
105
- <div className="flex items-end gap-2">
113
+ <div className="order-details-expected-value flex items-end gap-2">
106
114
  {order.type === "swap" ? (
107
115
  `~${finalFormattedExpectedDstAmount} ${dstToken.symbol}`
108
116
  ) : order.type === "mint_nft" ? (
109
- <div className="flex items-center gap-2">
110
- <img src={nft?.imageUrl} alt={nft?.name || "NFT"} className="h-5 w-5" />
111
- <div>{nft?.name || "NFT"}</div>
117
+ <div className="order-details-nft-info flex items-center gap-2">
118
+ <img src={nft?.imageUrl} alt={nft?.name || "NFT"} className="order-details-nft-image h-5 w-5" />
119
+ <div className="order-details-nft-name">{nft?.name || "NFT"}</div>
112
120
  </div>
113
121
  ) : order.type === "join_tournament" || order.type === "fund_tournament" ? (
114
- <div className="flex items-center gap-2">
115
- <img src={tournament?.imageUrl} alt={tournament?.name || "Tournament"} className="h-5 w-5" />
116
- <div>{tournament?.name || "Tournament"}</div>
122
+ <div className="order-details-tournament-info flex items-center gap-2">
123
+ <img
124
+ src={tournament?.imageUrl}
125
+ alt={tournament?.name || "Tournament"}
126
+ className="order-details-tournament-image h-5 w-5"
127
+ />
128
+ <div className="order-details-tournament-name">{tournament?.name || "Tournament"}</div>
117
129
  </div>
118
- ) : order.type === "custom" && order.metadata.action === DEPOSIT_HYPE_ACTION ? (
119
- <div className="flex items-center gap-2">
120
- <div>{formatTokenAmount(BigInt(order.payload.amount), dstToken.decimals)} HYPE</div>
130
+ ) : order.type === "hype_duel" ? (
131
+ <div className="order-details-hype-info flex items-center gap-2">
132
+ <div className="order-details-hype-amount">
133
+ {formatTokenAmount(BigInt(order.payload.expectedDstAmount), dstToken.decimals)} HYPE
134
+ </div>
121
135
  </div>
122
136
  ) : null}
123
137
 
124
- <div className="text-as-primary/50 flex items-center gap-2">
125
- <span>on {order.dstChain !== b3.id && getChainName(order.dstChain)}</span>
138
+ <div className="order-details-chain-info text-as-primary/50 flex items-center gap-2">
139
+ <span className="order-details-chain-text">
140
+ on {order.dstChain !== b3.id && getChainName(order.dstChain)}
141
+ </span>
126
142
  <img
127
143
  src={ALL_CHAINS[order.dstChain].logoUrl}
128
144
  alt={getChainName(order.dstChain)}
129
145
  className={cn(
130
- "h-3",
146
+ "order-details-chain-logo h-3",
131
147
  order.dstChain !== b3.id && "w-3 rounded-full",
132
148
  order.dstChain === b3.id && "h-4",
133
149
  )}
@@ -136,25 +152,30 @@ export const OrderDetailsCollapsible = memo(function OrderDetailsCollapsible({
136
152
  </div>
137
153
  </div>
138
154
 
139
- <div className="divider w-full" />
155
+ <div className="order-details-divider divider w-full" />
140
156
 
141
157
  {/* Order ID / Total Section */}
142
- <div className="flex w-full justify-between gap-4">
143
- <div className="text-as-tertiarry">{showTotal ? "Total (included fee)" : "Order ID"}</div>
144
- <div className="text-as-primary overflow-hidden text-ellipsis whitespace-nowrap">
158
+ <div className="order-details-id-total-section flex w-full justify-between gap-4">
159
+ <div className="order-details-id-total-label text-as-tertiarry">
160
+ {showTotal ? "Total (included fee)" : "Order ID"}
161
+ </div>
162
+ <div className="order-details-id-total-value text-as-primary overflow-hidden text-ellipsis whitespace-nowrap">
145
163
  {showTotal && totalAmount ? totalAmount : order.id}
146
164
  </div>
147
165
  </div>
148
166
  </div>
149
167
  </motion.div>
150
168
  ) : (
151
- <div className="flex w-full items-center">
152
- <div className="divider w-full" />
153
- <button className="whitespace-nowrap text-sm" onClick={() => setShowOrderDetails(true)}>
169
+ <div className="order-details-collapsed flex w-full items-center">
170
+ <div className="order-details-collapsed-divider divider w-full" />
171
+ <button
172
+ className="order-details-collapsed-button whitespace-nowrap text-sm"
173
+ onClick={() => setShowOrderDetails(true)}
174
+ >
154
175
  Order Details
155
176
  </button>
156
- <ChevronDown className="text-as-primary mx-1 h-4 min-h-4 w-4 min-w-4" />
157
- <div className="divider w-full" />
177
+ <ChevronDown className="order-details-collapsed-chevron text-as-primary mx-1 h-4 min-h-4 w-4 min-w-4" />
178
+ <div className="order-details-collapsed-divider divider w-full" />
158
179
  </div>
159
180
  )}
160
181
  </div>
@@ -0,0 +1,38 @@
1
+ "use client";
2
+
3
+ import { CryptoPaymentMethodType } from "./CryptoPaymentMethod";
4
+
5
+ interface PaymentMethodSwitchProps {
6
+ currentMethod: CryptoPaymentMethodType;
7
+ onMethodChange?: (method: CryptoPaymentMethodType) => void;
8
+ }
9
+
10
+ export function PaymentMethodSwitch({ currentMethod, onMethodChange }: PaymentMethodSwitchProps) {
11
+ if (!onMethodChange) return null;
12
+
13
+ const isTransferCrypto = currentMethod === CryptoPaymentMethodType.TRANSFER_CRYPTO;
14
+ const isConnectWallet =
15
+ currentMethod === CryptoPaymentMethodType.CONNECT_WALLET || currentMethod === CryptoPaymentMethodType.GLOBAL_WALLET;
16
+
17
+ // Only show switch if we're in one of the payment states
18
+ if (!isTransferCrypto && !isConnectWallet) return null;
19
+
20
+ const handleSwitch = () => {
21
+ if (isTransferCrypto) {
22
+ onMethodChange(CryptoPaymentMethodType.CONNECT_WALLET);
23
+ } else {
24
+ onMethodChange(CryptoPaymentMethodType.TRANSFER_CRYPTO);
25
+ }
26
+ };
27
+
28
+ return (
29
+ <div className="order-details-payment-switch-container flex items-center justify-center">
30
+ <button
31
+ onClick={handleSwitch}
32
+ className="order-details-payment-switch-btn text-as-primary/60 hover:text-as-primary text-sm underline transition-colors"
33
+ >
34
+ {isTransferCrypto ? "Switch to Connect Wallet" : "Switch to scan / manually send crypto"}
35
+ </button>
36
+ </div>
37
+ );
38
+ }
@@ -11,7 +11,9 @@ import { QRCodeSVG } from "qrcode.react";
11
11
  import { memo, useEffect, useMemo, useState } from "react";
12
12
  import { toast } from "sonner";
13
13
  import { b3 } from "viem/chains";
14
+ import { CryptoPaymentMethodType } from "./CryptoPaymentMethod";
14
15
  import { OrderDetailsCollapsible } from "./OrderDetailsCollapsible";
16
+ import { PaymentMethodSwitch } from "./PaymentMethodSwitch";
15
17
 
16
18
  type Order = components["schemas"]["Order"];
17
19
  type Token = components["schemas"]["Token"];
@@ -26,6 +28,7 @@ interface TransferCryptoDetailsProps {
26
28
  nft?: NFT;
27
29
  onBack: () => void;
28
30
  recipientName?: string;
31
+ onPaymentMethodChange?: (method: CryptoPaymentMethodType) => void;
29
32
  }
30
33
 
31
34
  export const TransferCryptoDetails = memo(function TransferCryptoDetails({
@@ -36,6 +39,7 @@ export const TransferCryptoDetails = memo(function TransferCryptoDetails({
36
39
  nft,
37
40
  onBack,
38
41
  recipientName,
42
+ onPaymentMethodChange,
39
43
  }: TransferCryptoDetailsProps) {
40
44
  const [timeLeft, setTimeLeft] = useState(0);
41
45
 
@@ -98,21 +102,21 @@ export const TransferCryptoDetails = memo(function TransferCryptoDetails({
98
102
  };
99
103
 
100
104
  return (
101
- <div className="flex w-full flex-col gap-6">
105
+ <div className="order-transfer-crypto flex w-full flex-col gap-6">
102
106
  {/* Header */}
103
- <div className="flex items-center justify-between">
107
+ <div className="order-transfer-crypto-header flex items-center justify-between">
104
108
  <button
105
109
  onClick={onBack}
106
- className="text-as-primary/60 hover:text-as-primary flex h-10 w-10 items-center justify-center rounded-full transition-colors"
110
+ className="order-transfer-crypto-back-btn text-as-primary/60 hover:text-as-primary flex h-10 w-10 items-center justify-center rounded-full transition-colors"
107
111
  >
108
112
  <ChevronLeft size={24} className="text-as-quaternary" />
109
113
  </button>
110
114
 
111
- <h2 className="text-as-primary text-lg font-semibold">Transfer crypto</h2>
115
+ <h2 className="order-transfer-crypto-title text-as-primary text-lg font-semibold">Transfer crypto</h2>
112
116
 
113
117
  {/* Countdown Timer */}
114
- <div className="relative flex h-11 w-11 items-center justify-center">
115
- <svg className="h-11 w-11 -rotate-90" viewBox="0 0 44 44">
118
+ <div className="order-transfer-crypto-timer relative flex h-11 w-11 items-center justify-center">
119
+ <svg className="order-transfer-crypto-timer-svg h-11 w-11 -rotate-90" viewBox="0 0 44 44">
116
120
  <circle
117
121
  cx="22"
118
122
  cy="22"
@@ -120,7 +124,7 @@ export const TransferCryptoDetails = memo(function TransferCryptoDetails({
120
124
  stroke="currentColor"
121
125
  strokeWidth="3"
122
126
  fill="none"
123
- className="text-gray-200"
127
+ className="order-transfer-crypto-timer-bg text-gray-200"
124
128
  />
125
129
  <circle
126
130
  cx="22"
@@ -130,7 +134,7 @@ export const TransferCryptoDetails = memo(function TransferCryptoDetails({
130
134
  strokeWidth="3"
131
135
  fill="none"
132
136
  strokeLinecap="round"
133
- className="text-blue-500"
137
+ className="order-transfer-crypto-timer-progress text-blue-500"
134
138
  strokeDasharray={`${2 * Math.PI * 18}`}
135
139
  strokeDashoffset={`${2 * Math.PI * 18 * (1 - timeLeft / totalTime)}`}
136
140
  style={{
@@ -138,57 +142,66 @@ export const TransferCryptoDetails = memo(function TransferCryptoDetails({
138
142
  }}
139
143
  />
140
144
  </svg>
141
- <div className="absolute inset-0 flex items-center justify-center">
145
+ <div className="order-transfer-crypto-timer-text absolute inset-0 flex items-center justify-center">
142
146
  <span className="text-as-primary text-[10px] font-semibold">{formatTime(timeLeft)}</span>
143
147
  </div>
144
148
  </div>
145
149
  </div>
146
150
 
147
151
  {/* Main Content Cards */}
148
- <div className="flex w-full flex-col gap-4">
152
+ <div className="order-transfer-crypto-content flex w-full flex-col gap-4">
149
153
  {/* Amount Card */}
150
- <div className="flex items-center gap-4">
151
- <div className="w-full">
152
- <span className="text-as-content-secondary text-sm font-medium">Amount</span>
153
- <div className="border-as-border-primary rounded-lg border p-2 shadow-sm">
154
+ <div className="order-transfer-crypto-cards flex items-center gap-4">
155
+ <div className="order-transfer-crypto-amount-card w-full">
156
+ <span className="order-transfer-crypto-amount-label text-as-content-secondary text-sm font-medium">
157
+ Amount
158
+ </span>
159
+ <div className="order-transfer-crypto-amount-container border-as-border-primary rounded-lg border p-2 shadow-sm">
154
160
  <CopyToClipboard
155
161
  text={roundedUpSrcAmount || ""}
156
162
  onCopy={() => {
157
163
  toast.success("Amount copied to clipboard");
158
164
  }}
159
165
  >
160
- <div className="flex cursor-pointer items-center justify-between gap-2">
161
- <strong className="text-as-primary font-semibold">
166
+ <div className="order-transfer-crypto-amount-copy flex cursor-pointer items-center justify-between gap-2">
167
+ <strong className="order-transfer-crypto-amount-text text-as-primary font-semibold">
162
168
  {roundedUpSrcAmount} {srcToken.symbol}
163
169
  </strong>
164
- <Copy className="text-as-primary/50 hover:text-as-primary h-4 w-4 transition-all duration-200" />
170
+ <Copy className="order-transfer-crypto-amount-copy-icon text-as-primary/50 hover:text-as-primary h-4 w-4 transition-all duration-200" />
165
171
  </div>
166
172
  </CopyToClipboard>
167
173
  </div>
168
174
  </div>
169
175
 
170
176
  {/* Chain Card */}
171
- <div className="w-full">
172
- <span className="text-as-content-secondary text-sm font-medium">Chain</span>
173
- <div className="border-as-border-primary rounded-lg border p-2 shadow-sm">
174
- <div className="flex items-center gap-2">
177
+ <div className="order-transfer-crypto-chain-card w-full">
178
+ <span className="order-transfer-crypto-chain-label text-as-content-secondary text-sm font-medium">
179
+ Chain
180
+ </span>
181
+ <div className="order-transfer-crypto-chain-container border-as-border-primary rounded-lg border p-2 shadow-sm">
182
+ <div className="order-transfer-crypto-chain-info flex items-center gap-2">
175
183
  <img
176
184
  src={ALL_CHAINS[order.srcChain].logoUrl}
177
185
  alt={getChainName(order.srcChain)}
178
- className={cn("h-6 rounded-full", order.srcChain === b3.id && "h-5 rounded-none")}
186
+ className={cn(
187
+ "order-transfer-crypto-chain-logo h-6 rounded-full",
188
+ order.srcChain === b3.id && "h-5 rounded-none",
189
+ )}
179
190
  />
180
- <span className="text-as-primary text-sm font-semibold">{getChainName(order.srcChain)}</span>
191
+ <span className="order-transfer-crypto-chain-name text-as-primary text-sm font-semibold">
192
+ {getChainName(order.srcChain)}
193
+ </span>
181
194
  </div>
182
195
  </div>
183
196
  </div>
184
197
  </div>
185
198
 
186
199
  {/* QR Code and Deposit Address Card */}
187
- <div className="border-b3-react-border bg-as-surface-secondary grid h-[220px] grid-cols-2 overflow-hidden rounded-xl border">
200
+ <div className="order-transfer-crypto-qr-deposit-card border-b3-react-border bg-as-surface-secondary grid h-[220px] grid-cols-2 overflow-hidden rounded-xl border">
188
201
  {/* QR Code Section */}
189
- <div className="border-as-border-primary h-full w-full border-r">
190
- <div className="flex justify-center">
191
- <div className="bg-as-surface-secondary flex flex-col items-center rounded-lg p-6">
202
+ <div className="order-transfer-crypto-qr-section border-as-border-primary h-full w-full border-r">
203
+ <div className="order-transfer-crypto-qr-wrapper flex justify-center">
204
+ <div className="order-transfer-crypto-qr-container bg-as-surface-secondary flex flex-col items-center rounded-lg p-6">
192
205
  <QRCodeSVG
193
206
  value={getPaymentUrl(
194
207
  order.globalAddress,
@@ -197,15 +210,17 @@ export const TransferCryptoDetails = memo(function TransferCryptoDetails({
197
210
  order.srcChain,
198
211
  srcToken?.decimals,
199
212
  )}
200
- className="bg-as-surface-secondary max-h-48 max-w-48"
213
+ className="order-transfer-crypto-qr-code bg-as-surface-secondary max-h-48 max-w-48"
201
214
  />
202
- <div className="mt-3 flex items-center justify-center gap-2 text-sm">
203
- <span className="text-as-brand/70 text-sm font-medium">SCAN WITH</span>
215
+ <div className="order-transfer-crypto-wallet-hint mt-3 flex items-center justify-center gap-2 text-sm">
216
+ <span className="order-transfer-crypto-wallet-text text-as-brand/70 text-sm font-medium">
217
+ SCAN WITH
218
+ </span>
204
219
  <TextLoop interval={3}>
205
- <WalletMetamask className="h-5 w-5" variant="branded" />
206
- <WalletCoinbase className="h-5 w-5" variant="branded" />
207
- <WalletPhantom className="h-5 w-5" variant="branded" />
208
- <WalletTrust className="h-5 w-5" variant="branded" />
220
+ <WalletMetamask className="order-transfer-crypto-wallet-icon h-5 w-5" variant="branded" />
221
+ <WalletCoinbase className="order-transfer-crypto-wallet-icon h-5 w-5" variant="branded" />
222
+ <WalletPhantom className="order-transfer-crypto-wallet-icon h-5 w-5" variant="branded" />
223
+ <WalletTrust className="order-transfer-crypto-wallet-icon h-5 w-5" variant="branded" />
209
224
  </TextLoop>
210
225
  </div>
211
226
  </div>
@@ -213,17 +228,19 @@ export const TransferCryptoDetails = memo(function TransferCryptoDetails({
213
228
  </div>
214
229
 
215
230
  {/* Deposit Address Section */}
216
- <div className="flex h-full w-full flex-col gap-2 p-6">
217
- <span className="text-as-content-secondary text-sm font-medium">Deposit address:</span>
231
+ <div className="order-transfer-crypto-address-section flex h-full w-full flex-col gap-2 p-6">
232
+ <span className="order-transfer-crypto-address-label text-as-content-secondary text-sm font-medium">
233
+ Deposit address:
234
+ </span>
218
235
  <div
219
- className="flex h-full cursor-pointer flex-col items-stretch justify-between gap-4"
236
+ className="order-transfer-crypto-address-copy flex h-full cursor-pointer flex-col items-stretch justify-between gap-4"
220
237
  onClick={handleCopyAddress}
221
238
  >
222
- <div className="text-as-primary break-all font-mono text-sm font-semibold leading-relaxed">
239
+ <div className="order-transfer-crypto-address-text text-as-primary break-all font-mono text-sm font-semibold leading-relaxed">
223
240
  {order.globalAddress}
224
241
  </div>
225
- <div className="place-self-end">
226
- <Copy className="group-hover:text-as-brand text-as-tertiarry h-4 w-4 cursor-pointer transition-all duration-200" />
242
+ <div className="order-transfer-crypto-address-copy-icon-wrapper place-self-end">
243
+ <Copy className="order-transfer-crypto-address-copy-icon group-hover:text-as-brand text-as-tertiarry h-4 w-4 cursor-pointer transition-all duration-200" />
227
244
  </div>
228
245
  </div>
229
246
  </div>
@@ -240,23 +257,28 @@ export const TransferCryptoDetails = memo(function TransferCryptoDetails({
240
257
  </div>
241
258
 
242
259
  {/* Action Buttons */}
243
- <div className="flex flex-col gap-3">
260
+ <div className="order-transfer-crypto-actions flex flex-col gap-3">
244
261
  <ShinyButton
245
262
  accentColor="hsl(var(--as-brand))"
246
263
  textColor="text-white"
247
- className="w-full py-3"
264
+ className="order-transfer-crypto-copy-btn w-full py-3"
248
265
  onClick={handleCopyAddress}
249
266
  >
250
267
  Copy deposit address
251
268
  </ShinyButton>
252
269
 
253
270
  {/* <button
254
- className="text-as-primary/60 hover:text-as-primary flex w-full items-center justify-center gap-2 py-2 transition-colors"
271
+ className="order-transfer-crypto-cancel-btn text-as-primary/60 hover:text-as-primary flex w-full items-center justify-center gap-2 py-2 transition-colors"
255
272
  onClick={onBack}
256
273
  >
257
274
  <RefreshCcw className="h-4 w-4" />
258
275
  Cancel and start over
259
276
  </button> */}
277
+
278
+ <PaymentMethodSwitch
279
+ currentMethod={CryptoPaymentMethodType.TRANSFER_CRYPTO}
280
+ onMethodChange={onPaymentMethodChange}
281
+ />
260
282
  </div>
261
283
  </div>
262
284
  );