thirdweb 5.96.5 → 5.96.6
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/cjs/analytics/track/pay.js +14 -13
- package/dist/cjs/analytics/track/pay.js.map +1 -1
- package/dist/cjs/react/core/hooks/transaction/useSendTransaction.js +6 -4
- package/dist/cjs/react/core/hooks/transaction/useSendTransaction.js.map +1 -1
- package/dist/cjs/react/web/hooks/transaction/useSendTransaction.js +2 -1
- package/dist/cjs/react/web/hooks/transaction/useSendTransaction.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/BuyScreen.js +10 -0
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/BuyScreen.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/DirectPaymentModeScreen.js +2 -0
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/DirectPaymentModeScreen.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/TransactionModeScreen.js +3 -0
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/TransactionModeScreen.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatScreenContent.js +12 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatScreenContent.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/fiat/OnRampScreen.js +12 -13
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/fiat/OnRampScreen.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/ConfirmationScreen.js +8 -12
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/ConfirmationScreen.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/SwapScreenContent.js +13 -0
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/SwapScreenContent.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/TokenSelectorScreen.js +44 -3
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/TokenSelectorScreen.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/TransferConfirmationScreen.js +41 -0
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/TransferConfirmationScreen.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/useSwapSupportedChains.js +8 -0
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/useSwapSupportedChains.js.map +1 -1
- package/dist/cjs/react/web/ui/TransactionButton/TransactionModal.js +7 -3
- package/dist/cjs/react/web/ui/TransactionButton/TransactionModal.js.map +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/analytics/track/pay.js +14 -13
- package/dist/esm/analytics/track/pay.js.map +1 -1
- package/dist/esm/react/core/hooks/transaction/useSendTransaction.js +6 -4
- package/dist/esm/react/core/hooks/transaction/useSendTransaction.js.map +1 -1
- package/dist/esm/react/web/hooks/transaction/useSendTransaction.js +2 -1
- package/dist/esm/react/web/hooks/transaction/useSendTransaction.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/BuyScreen.js +10 -0
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/BuyScreen.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/DirectPaymentModeScreen.js +2 -0
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/DirectPaymentModeScreen.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/TransactionModeScreen.js +3 -0
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/TransactionModeScreen.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatScreenContent.js +12 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatScreenContent.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/fiat/OnRampScreen.js +12 -13
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/fiat/OnRampScreen.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/ConfirmationScreen.js +8 -12
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/ConfirmationScreen.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/SwapScreenContent.js +13 -0
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/SwapScreenContent.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/TokenSelectorScreen.js +44 -3
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/TokenSelectorScreen.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/TransferConfirmationScreen.js +41 -0
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/TransferConfirmationScreen.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/useSwapSupportedChains.js +8 -0
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/useSwapSupportedChains.js.map +1 -1
- package/dist/esm/react/web/ui/TransactionButton/TransactionModal.js +7 -3
- package/dist/esm/react/web/ui/TransactionButton/TransactionModal.js.map +1 -1
- package/dist/esm/version.js +1 -1
- package/dist/types/analytics/track/pay.d.ts +3 -4
- package/dist/types/analytics/track/pay.d.ts.map +1 -1
- package/dist/types/react/core/hooks/transaction/useSendTransaction.d.ts.map +1 -1
- package/dist/types/react/web/hooks/transaction/useSendTransaction.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/BuyScreen.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/DirectPaymentModeScreen.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/TransactionModeScreen.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatScreenContent.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/ConfirmationScreen.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/SwapScreenContent.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/TokenSelectorScreen.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/TransferConfirmationScreen.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/useSwapSupportedChains.d.ts.map +1 -1
- package/dist/types/react/web/ui/TransactionButton/TransactionModal.d.ts +1 -0
- package/dist/types/react/web/ui/TransactionButton/TransactionModal.d.ts.map +1 -1
- package/dist/types/version.d.ts +1 -1
- package/package.json +3 -3
- package/src/analytics/track/pay.test.ts +5 -7
- package/src/analytics/track/pay.ts +17 -17
- package/src/react/core/hooks/transaction/useSendTransaction.ts +6 -4
- package/src/react/web/hooks/transaction/useSendTransaction.tsx +2 -0
- package/src/react/web/ui/ConnectWallet/screens/Buy/BuyScreen.tsx +10 -0
- package/src/react/web/ui/ConnectWallet/screens/Buy/DirectPaymentModeScreen.tsx +2 -0
- package/src/react/web/ui/ConnectWallet/screens/Buy/TransactionModeScreen.tsx +3 -0
- package/src/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatScreenContent.tsx +12 -1
- package/src/react/web/ui/ConnectWallet/screens/Buy/fiat/OnRampScreen.tsx +12 -13
- package/src/react/web/ui/ConnectWallet/screens/Buy/swap/ConfirmationScreen.tsx +8 -12
- package/src/react/web/ui/ConnectWallet/screens/Buy/swap/SwapScreenContent.tsx +13 -0
- package/src/react/web/ui/ConnectWallet/screens/Buy/swap/TokenSelectorScreen.tsx +44 -3
- package/src/react/web/ui/ConnectWallet/screens/Buy/swap/TransferConfirmationScreen.tsx +43 -0
- package/src/react/web/ui/ConnectWallet/screens/Buy/swap/useSwapSupportedChains.ts +10 -0
- package/src/react/web/ui/TransactionButton/TransactionModal.tsx +8 -3
- package/src/version.ts +1 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"DirectPaymentModeScreen.d.ts","sourceRoot":"","sources":["../../../../../../../../src/react/web/ui/ConnectWallet/screens/Buy/DirectPaymentModeScreen.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mCAAmC,CAAC;AAC/D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAOzE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gDAAgD,CAAC;AAG9E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4DAA4D,CAAC;AAM/F,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAWnE,OAAO,EAAE,KAAK,kBAAkB,EAAiB,MAAM,mBAAmB,CAAC;AAC3E,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAEhF,wBAAgB,uBAAuB,CAAC,KAAK,EAAE;IAC7C,MAAM,EAAE,cAAc,CAAC;IACvB,YAAY,EAAE,OAAO,CAAC,YAAY,EAAE;QAAE,IAAI,EAAE,gBAAgB,CAAA;KAAE,CAAC,CAAC;IAChE,qBAAqB,EAAE,uBAAuB,CAAC;IAC/C,YAAY,EAAE,OAAO,GAAG,SAAS,CAAC;IAClC,cAAc,EAAE,sBAAsB,GAAG,SAAS,CAAC;IACnD,UAAU,EAAE,CACV,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,KAAK,EACd,OAAO,EAAE,kBAAkB,KACxB,IAAI,CAAC;CACX,
|
1
|
+
{"version":3,"file":"DirectPaymentModeScreen.d.ts","sourceRoot":"","sources":["../../../../../../../../src/react/web/ui/ConnectWallet/screens/Buy/DirectPaymentModeScreen.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mCAAmC,CAAC;AAC/D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAOzE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gDAAgD,CAAC;AAG9E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4DAA4D,CAAC;AAM/F,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAWnE,OAAO,EAAE,KAAK,kBAAkB,EAAiB,MAAM,mBAAmB,CAAC;AAC3E,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAEhF,wBAAgB,uBAAuB,CAAC,KAAK,EAAE;IAC7C,MAAM,EAAE,cAAc,CAAC;IACvB,YAAY,EAAE,OAAO,CAAC,YAAY,EAAE;QAAE,IAAI,EAAE,gBAAgB,CAAA;KAAE,CAAC,CAAC;IAChE,qBAAqB,EAAE,uBAAuB,CAAC;IAC/C,YAAY,EAAE,OAAO,GAAG,SAAS,CAAC;IAClC,cAAc,EAAE,sBAAsB,GAAG,SAAS,CAAC;IACnD,UAAU,EAAE,CACV,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,KAAK,EACd,OAAO,EAAE,kBAAkB,KACxB,IAAI,CAAC;CACX,8CA+OA"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"TransactionModeScreen.d.ts","sourceRoot":"","sources":["../../../../../../../../src/react/web/ui/ConnectWallet/screens/Buy/TransactionModeScreen.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mCAAmC,CAAC;AAC/D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAIzE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gDAAgD,CAAC;AAO9E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4DAA4D,CAAC;AAQ/F,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAcnE,OAAO,EACL,KAAK,kBAAkB,EAGxB,MAAM,mBAAmB,CAAC;AAG3B,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAEhF,wBAAgB,qBAAqB,CAAC,KAAK,EAAE;IAC3C,MAAM,EAAE,cAAc,CAAC;IACvB,YAAY,EAAE,OAAO,CAAC,YAAY,EAAE;QAAE,IAAI,EAAE,aAAa,CAAA;KAAE,CAAC,CAAC;IAC7D,qBAAqB,EAAE,uBAAuB,CAAC;IAC/C,YAAY,EAAE,OAAO,GAAG,SAAS,CAAC;IAClC,cAAc,EAAE,sBAAsB,GAAG,SAAS,CAAC;IACnD,UAAU,EAAE,CACV,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,KAAK,EACd,OAAO,EAAE,kBAAkB,KACxB,IAAI,CAAC;CACX,
|
1
|
+
{"version":3,"file":"TransactionModeScreen.d.ts","sourceRoot":"","sources":["../../../../../../../../src/react/web/ui/ConnectWallet/screens/Buy/TransactionModeScreen.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mCAAmC,CAAC;AAC/D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAIzE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gDAAgD,CAAC;AAO9E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4DAA4D,CAAC;AAQ/F,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAcnE,OAAO,EACL,KAAK,kBAAkB,EAGxB,MAAM,mBAAmB,CAAC;AAG3B,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAEhF,wBAAgB,qBAAqB,CAAC,KAAK,EAAE;IAC3C,MAAM,EAAE,cAAc,CAAC;IACvB,YAAY,EAAE,OAAO,CAAC,YAAY,EAAE;QAAE,IAAI,EAAE,aAAa,CAAA;KAAE,CAAC,CAAC;IAC7D,qBAAqB,EAAE,uBAAuB,CAAC;IAC/C,YAAY,EAAE,OAAO,GAAG,SAAS,CAAC;IAClC,cAAc,EAAE,sBAAsB,GAAG,SAAS,CAAC;IACnD,UAAU,EAAE,CACV,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,KAAK,EACd,OAAO,EAAE,kBAAkB,KACxB,IAAI,CAAC;CACX,8CAmVA"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"FiatScreenContent.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatScreenContent.tsx"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"FiatScreenContent.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatScreenContent.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sCAAsC,CAAC;AAClE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AAI5E,OAAO,EACL,KAAK,KAAK,EAGX,MAAM,+CAA+C,CAAC;AACvD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+DAA+D,CAAC;AAelG,OAAO,EAAE,KAAK,kBAAkB,EAAiB,MAAM,sBAAsB,CAAC;AAG9E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAEpD,wBAAgB,iBAAiB,CAAC,KAAK,EAAE;IACvC,SAAS,EAAE,CAAC,MAAM,EAAE,cAAc,KAAK,IAAI,CAAC;IAC5C,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,kBAAkB,CAAC;IAC5B,OAAO,EAAE,KAAK,CAAC;IACf,gBAAgB,EAAE,YAAY,CAAC;IAC/B,oBAAoB,EAAE,MAAM,IAAI,CAAC;IACjC,UAAU,EAAE,YAAY,CAAC;IACzB,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,KAAK,CAAC;IAChC,MAAM,EAAE,cAAc,CAAC;IACvB,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,SAAS,CAAC;IACjB,cAAc,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,kBAAkB,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,IAAI,CAAC;CAClD,8CA0PA"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ConfirmationScreen.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/react/web/ui/ConnectWallet/screens/Buy/swap/ConfirmationScreen.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sCAAsC,CAAC;AAClE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AAG5E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oDAAoD,CAAC;AAgB7F,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE/D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAK7C;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE;IAC5C,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,MAAM,EAAE,cAAc,CAAC;IACvB,KAAK,EAAE,kBAAkB,CAAC;IAC1B,aAAa,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,OAAO,EAAE,KAAK,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,KAAK,CAAC;IACjB,OAAO,EAAE,kBAAkB,CAAC;IAC5B,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,kBAAkB,CAAC;IAC9B,eAAe,EAAE,MAAM,CAAC;IACxB,UAAU,EAAE,OAAO,CAAC;IACpB,KAAK,EAAE,SAAS,CAAC;IACjB,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B,
|
1
|
+
{"version":3,"file":"ConfirmationScreen.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/react/web/ui/ConnectWallet/screens/Buy/swap/ConfirmationScreen.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sCAAsC,CAAC;AAClE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AAG5E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oDAAoD,CAAC;AAgB7F,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE/D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAK7C;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE;IAC5C,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,MAAM,EAAE,cAAc,CAAC;IACvB,KAAK,EAAE,kBAAkB,CAAC;IAC1B,aAAa,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,OAAO,EAAE,KAAK,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,KAAK,CAAC;IACjB,OAAO,EAAE,kBAAkB,CAAC;IAC5B,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,kBAAkB,CAAC;IAC9B,eAAe,EAAE,MAAM,CAAC;IACxB,UAAU,EAAE,OAAO,CAAC;IACpB,KAAK,EAAE,SAAS,CAAC;IACjB,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B,8CA8SA;AAED,eAAO,MAAM,aAAa;;;yGAOxB,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"SwapScreenContent.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/react/web/ui/ConnectWallet/screens/Buy/swap/SwapScreenContent.tsx"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"SwapScreenContent.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/react/web/ui/ConnectWallet/screens/Buy/swap/SwapScreenContent.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sCAAsC,CAAC;AAElE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AAM5E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mDAAmD,CAAC;AACjF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+DAA+D,CAAC;AAIlG,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AAatE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,KAAK,kBAAkB,EAAiB,MAAM,sBAAsB,CAAC;AAE9E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAI7C,wBAAgB,iBAAiB,CAAC,KAAK,EAAE;IACvC,SAAS,EAAE,CAAC,MAAM,EAAE,cAAc,KAAK,IAAI,CAAC;IAC5C,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,kBAAkB,CAAC;IAC5B,OAAO,EAAE,KAAK,CAAC;IACf,SAAS,EAAE,KAAK,GAAG,SAAS,CAAC;IAC7B,SAAS,EAAE,kBAAkB,GAAG,SAAS,CAAC;IAC1C,qBAAqB,EAAE,MAAM,IAAI,CAAC;IAClC,KAAK,EAAE,SAAS,CAAC;IACjB,MAAM,EAAE,cAAc,CAAC;IACvB,UAAU,EAAE,YAAY,CAAC;IACzB,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,cAAc,EAAE,sBAAsB,GAAG,SAAS,CAAC;IACnD,aAAa,EAAE,aAAa,CAAC;IAC7B,QAAQ,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,IAAI,CAAC;IACrC,aAAa,EAAE,OAAO,CAAC;IACvB,cAAc,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,kBAAkB,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,IAAI,CAAC;IACjD,qBAAqB,EAAE,OAAO,CAAC;CAChC,8CAuVA"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"TokenSelectorScreen.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/react/web/ui/ConnectWallet/screens/Buy/swap/TokenSelectorScreen.tsx"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"TokenSelectorScreen.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/react/web/ui/ConnectWallet/screens/Buy/swap/TokenSelectorScreen.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sCAAsC,CAAC;AAElE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AAE5E,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mDAAmD,CAAC;AAKhF,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,8CAA8C,CAAC;AAO7E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+DAA+D,CAAC;AASlG,OAAO,KAAK,EACV,eAAe,EACf,SAAS,EACV,MAAM,+CAA+C,CAAC;AAUvD,OAAO,EAAE,KAAK,kBAAkB,EAAiB,MAAM,sBAAsB,CAAC;AAe9E,wBAAgB,mBAAmB,CAAC,KAAK,EAAE;IACzC,MAAM,EAAE,cAAc,CAAC;IACvB,YAAY,EAAE,eAAe,GAAG,SAAS,CAAC;IAC1C,qBAAqB,EAAE,eAAe,GAAG,SAAS,CAAC;IACnD,OAAO,EAAE,KAAK,CAAC;IACf,OAAO,EAAE,kBAAkB,CAAC;IAC5B,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;IAC3B,aAAa,CAAC,EAAE,QAAQ,EAAE,CAAC;IAC3B,aAAa,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACxE,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,aAAa,EAAE,MAAM,IAAI,CAAC;IAC1B,aAAa,EAAE,OAAO,CAAC;CACxB,8CAmQA"}
|
package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/TransferConfirmationScreen.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"TransferConfirmationScreen.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/react/web/ui/ConnectWallet/screens/Buy/swap/TransferConfirmationScreen.tsx"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"TransferConfirmationScreen.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/react/web/ui/ConnectWallet/screens/Buy/swap/TransferConfirmationScreen.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sCAAsC,CAAC;AAElE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AAU5E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qDAAqD,CAAC;AAS/F,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+DAA+D,CAAC;AAQlG,OAAO,EAAE,KAAK,kBAAkB,EAAiB,MAAM,sBAAsB,CAAC;AAE9E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAK7C,KAAK,+BAA+B,GAAG;IACrC,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,kBAAkB,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7C,KAAK,EAAE,SAAS,CAAC;IACjB,eAAe,EAAE,MAAM,CAAC;IACxB,MAAM,EAAE,cAAc,CAAC;IACvB,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,KAAK,EAAE,KAAK,CAAC;IACb,KAAK,EAAE,kBAAkB,CAAC;IAC1B,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,UAAU,CAAC,EAAE,YAAY,CAAC;IAC1B,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,mBAAmB,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;CAChE,CAAC;AAEF,wBAAgB,0BAA0B,CACxC,KAAK,EAAE,+BAA+B,8CA6YvC"}
|
package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/useSwapSupportedChains.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useSwapSupportedChains.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/react/web/ui/ConnectWallet/screens/Buy/swap/useSwapSupportedChains.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sCAAsC,CAAC;AAElE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;
|
1
|
+
{"version":3,"file":"useSwapSupportedChains.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/react/web/ui/ConnectWallet/screens/Buy/swap/useSwapSupportedChains.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sCAAsC,CAAC;AAElE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AAsB5E,MAAM,MAAM,uBAAuB,GAAG,KAAK,CAAC;IAC1C,KAAK,EAAE,KAAK,CAAC;IACb,MAAM,EAAE,KAAK,CAAC;QACZ,OAAO,EAAE,MAAM,CAAC;QAChB,oBAAoB,EAAE,OAAO,CAAC;QAC9B,kBAAkB,EAAE,OAAO,CAAC;QAC5B,IAAI,EAAE,MAAM,CAAC;QACb,MAAM,EAAE,MAAM,CAAC;QACf,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,CAAC,CAAC;CACJ,CAAC,CAAC;AAEH,wBAAsB,6BAA6B,CACjD,MAAM,EAAE,cAAc,EACtB,UAAU,CAAC,EAAE,OAAO,GACnB,OAAO,CAAC,uBAAuB,CAAC,CA6BlC;AAED;;GAEG;AACH,wBAAgB,2BAA2B,CACzC,MAAM,EAAE,cAAc,EACtB,UAAU,CAAC,EAAE,OAAO,kFAQrB;AAED,wBAAgB,sBAAsB,CAAC,OAAO,EAAE;IAC9C,MAAM,EAAE,cAAc,CAAC;IACvB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,uBAAuB,EAAE,MAAM,CAAC;CACjC;;;;;iBA1Ec,MAAM;8BACO,OAAO;4BACT,OAAO;cACrB,MAAM;gBACJ,MAAM;;YAiGnB"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"TransactionModal.d.ts","sourceRoot":"","sources":["../../../../../../src/react/web/ui/TransactionButton/TransactionModal.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,wDAAwD,CAAC;AACpG,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gDAAgD,CAAC;
|
1
|
+
{"version":3,"file":"TransactionModal.d.ts","sourceRoot":"","sources":["../../../../../../src/react/web/ui/TransactionButton/TransactionModal.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,wDAAwD,CAAC;AACpG,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gDAAgD,CAAC;AAG1F,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sCAAsC,CAAC;AAClE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sDAAsD,CAAC;AAGzF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AAK5E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAG5C,KAAK,UAAU,GAAG;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,MAAM,EAAE,cAAc,CAAC;IACvB,QAAQ,EAAE,QAAQ,CAAC;IACnB,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC,KAAK,EAAE,KAAK,GAAG,OAAO,GAAG,MAAM,CAAC;IAChC,EAAE,EAAE,mBAAmB,CAAC;IACxB,UAAU,EAAE,YAAY,CAAC;IACzB,QAAQ,EAAE,CAAC,IAAI,EAAE,qBAAqB,KAAK,IAAI,CAAC;CACjD,CAAC;AAEF,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,UAAU,8CAyCjD"}
|
package/dist/types/version.d.ts
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
export declare const version = "5.96.
|
1
|
+
export declare const version = "5.96.6";
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "thirdweb",
|
3
|
-
"version": "5.96.
|
3
|
+
"version": "5.96.6",
|
4
4
|
"repository": {
|
5
5
|
"type": "git",
|
6
6
|
"url": "git+https://github.com/thirdweb-dev/js.git#main"
|
@@ -231,8 +231,8 @@
|
|
231
231
|
"@radix-ui/react-icons": "1.3.2",
|
232
232
|
"@radix-ui/react-tooltip": "1.2.3",
|
233
233
|
"@tanstack/react-query": "5.74.4",
|
234
|
-
"@walletconnect/ethereum-provider": "2.
|
235
|
-
"@walletconnect/sign-client": "2.
|
234
|
+
"@walletconnect/ethereum-provider": "2.20.1",
|
235
|
+
"@walletconnect/sign-client": "2.20.1",
|
236
236
|
"abitype": "1.0.8",
|
237
237
|
"cross-spawn": "7.0.6",
|
238
238
|
"fuse.js": "7.1.0",
|
@@ -35,11 +35,10 @@ describe("trackPayEvent", () => {
|
|
35
35
|
walletAddress: "0x1234567890123456789012345678901234567890",
|
36
36
|
walletType: "io.metamask",
|
37
37
|
fromToken: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
|
38
|
-
|
38
|
+
amountWei: "1000000",
|
39
39
|
toToken: "0xdAC17F958D2ee523a2206206994597C13D831ec7",
|
40
|
-
|
40
|
+
toChainId: 137,
|
41
41
|
chainId: 1,
|
42
|
-
dstChainId: 137,
|
43
42
|
});
|
44
43
|
|
45
44
|
expect(requestBody).toEqual({
|
@@ -52,7 +51,7 @@ describe("trackPayEvent", () => {
|
|
52
51
|
tokenAddress: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
|
53
52
|
amountWei: "1000000",
|
54
53
|
dstTokenAddress: "0xdAC17F958D2ee523a2206206994597C13D831ec7",
|
55
|
-
dstChainId:
|
54
|
+
dstChainId: 137,
|
56
55
|
});
|
57
56
|
});
|
58
57
|
|
@@ -80,11 +79,10 @@ describe("trackPayEvent", () => {
|
|
80
79
|
walletAddress: "0x1234567890123456789012345678901234567890",
|
81
80
|
walletType: "io.metamask",
|
82
81
|
fromToken: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
|
83
|
-
|
82
|
+
amountWei: "1000000",
|
84
83
|
toToken: "0xdAC17F958D2ee523a2206206994597C13D831ec7",
|
85
|
-
|
84
|
+
toChainId: 137,
|
86
85
|
chainId: 1,
|
87
|
-
dstChainId: 137,
|
88
86
|
});
|
89
87
|
|
90
88
|
expect(requestHeaders?.get("x-client-id")).toEqual("test-client-id");
|
@@ -12,28 +12,28 @@ export async function trackPayEvent(args: {
|
|
12
12
|
walletAddress?: string;
|
13
13
|
walletType?: string;
|
14
14
|
fromToken?: string;
|
15
|
-
|
16
|
-
toToken?: string;
|
17
|
-
toAmount?: string;
|
15
|
+
amountWei?: string;
|
18
16
|
chainId?: number;
|
19
|
-
|
17
|
+
toToken?: string;
|
18
|
+
toChainId?: number;
|
20
19
|
error?: string;
|
21
20
|
}) {
|
21
|
+
const data = {
|
22
|
+
source: "pay",
|
23
|
+
action: args.event,
|
24
|
+
clientId: args.client.clientId,
|
25
|
+
chainId: args.chainId,
|
26
|
+
walletAddress: args.walletAddress,
|
27
|
+
walletType: args.walletType,
|
28
|
+
tokenAddress: args.fromToken,
|
29
|
+
amountWei: args.amountWei,
|
30
|
+
dstTokenAddress: args.toToken,
|
31
|
+
dstChainId: args.toChainId,
|
32
|
+
errorCode: args.error,
|
33
|
+
};
|
22
34
|
return track({
|
23
35
|
client: args.client,
|
24
36
|
ecosystem: args.ecosystem,
|
25
|
-
data
|
26
|
-
source: "pay",
|
27
|
-
action: args.event,
|
28
|
-
clientId: args.client.clientId,
|
29
|
-
chainId: args.chainId,
|
30
|
-
walletAddress: args.walletAddress,
|
31
|
-
walletType: args.walletType,
|
32
|
-
tokenAddress: args.fromToken,
|
33
|
-
amountWei: args.fromAmount,
|
34
|
-
dstTokenAddress: args.toToken,
|
35
|
-
dstChainId: args.chainId,
|
36
|
-
errorCode: args.error,
|
37
|
-
},
|
37
|
+
data,
|
38
38
|
});
|
39
39
|
}
|
@@ -152,7 +152,7 @@ export function useSendTransactionCore(args: {
|
|
152
152
|
client: tx.client,
|
153
153
|
walletAddress: account.address,
|
154
154
|
walletType: wallet?.id,
|
155
|
-
|
155
|
+
chainId: tx.chain.id,
|
156
156
|
event: "pay_transaction_modal_disabled",
|
157
157
|
});
|
158
158
|
return sendTransaction({
|
@@ -188,7 +188,7 @@ export function useSendTransactionCore(args: {
|
|
188
188
|
client: tx.client,
|
189
189
|
walletAddress: account.address,
|
190
190
|
walletType: wallet?.id,
|
191
|
-
|
191
|
+
toChainId: tx.chain.id,
|
192
192
|
event: "pay_transaction_modal_pay_api_error",
|
193
193
|
error: err?.message,
|
194
194
|
});
|
@@ -221,7 +221,8 @@ export function useSendTransactionCore(args: {
|
|
221
221
|
client: tx.client,
|
222
222
|
walletAddress: account.address,
|
223
223
|
walletType: wallet?.id,
|
224
|
-
|
224
|
+
toChainId: tx.chain.id,
|
225
|
+
toToken: _erc20Value?.tokenAddress || undefined,
|
225
226
|
event: "pay_transaction_modal_chain_token_not_supported",
|
226
227
|
error: `chain ${tx.chain.id} ${_erc20Value ? `/ token ${_erc20Value?.tokenAddress}` : ""} not supported`,
|
227
228
|
});
|
@@ -272,7 +273,8 @@ export function useSendTransactionCore(args: {
|
|
272
273
|
client: tx.client,
|
273
274
|
walletAddress: account.address,
|
274
275
|
walletType: wallet?.id,
|
275
|
-
|
276
|
+
toChainId: tx.chain.id,
|
277
|
+
toToken: _erc20Value?.tokenAddress || undefined,
|
276
278
|
event: "pay_transaction_modal_has_enough_funds",
|
277
279
|
});
|
278
280
|
sendTx();
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import { useContext } from "react";
|
2
|
+
import { randomBytesHex } from "../../../../utils/random.js";
|
2
3
|
import {
|
3
4
|
type SendTransactionConfig,
|
4
5
|
type ShowModalData,
|
@@ -106,6 +107,7 @@ export function useSendTransaction(config: SendTransactionConfig = {}) {
|
|
106
107
|
setRootEl(
|
107
108
|
<TransactionModal
|
108
109
|
title={payModal?.metadata?.name || "Transaction"}
|
110
|
+
txId={randomBytesHex()}
|
109
111
|
tx={data.tx}
|
110
112
|
onComplete={data.sendTx}
|
111
113
|
onClose={() => {
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import { useQueryClient } from "@tanstack/react-query";
|
2
2
|
import { useCallback, useMemo, useState } from "react";
|
3
|
+
import { trackPayEvent } from "../../../../../../analytics/track/pay.js";
|
3
4
|
import type { Chain } from "../../../../../../chains/types.js";
|
4
5
|
import { getCachedChain } from "../../../../../../chains/utils.js";
|
5
6
|
import type { ThirdwebClient } from "../../../../../../client/client.js";
|
@@ -895,6 +896,15 @@ function MainScreen(props: {
|
|
895
896
|
backScreen: { id: "main" },
|
896
897
|
});
|
897
898
|
}
|
899
|
+
trackPayEvent({
|
900
|
+
event: "choose_payment_method_fund_wallet_mode",
|
901
|
+
client,
|
902
|
+
walletAddress: payerAccount.address,
|
903
|
+
toChainId: toChain.id,
|
904
|
+
toToken: isNativeToken(toToken)
|
905
|
+
? undefined
|
906
|
+
: toToken.address,
|
907
|
+
});
|
898
908
|
}}
|
899
909
|
>
|
900
910
|
Continue
|
@@ -250,6 +250,8 @@ export function DirectPaymentModeScreen(props: {
|
|
250
250
|
client,
|
251
251
|
walletAddress: payerAccount.address,
|
252
252
|
walletType: activeWallet?.id,
|
253
|
+
toChainId: paymentInfo.chain.id,
|
254
|
+
toToken: paymentInfo.token?.address,
|
253
255
|
});
|
254
256
|
onContinue(totalCost, paymentInfo.chain, token);
|
255
257
|
}}
|
@@ -356,6 +356,9 @@ export function TransactionModeScreen(props: {
|
|
356
356
|
client,
|
357
357
|
walletAddress: payerAccount.address,
|
358
358
|
walletType: activeWallet?.id,
|
359
|
+
toChainId: payUiOptions.transaction.chain.id,
|
360
|
+
toToken: transactionCostAndData.token.address,
|
361
|
+
amountWei: totalCostWei.toString(),
|
359
362
|
});
|
360
363
|
onContinue(
|
361
364
|
toTokens(totalCostWei, transactionCostAndData.decimals),
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import { ChevronDownIcon } from "@radix-ui/react-icons";
|
2
2
|
import { useState } from "react";
|
3
|
+
import { trackPayEvent } from "../../../../../../../analytics/track/pay.js";
|
3
4
|
import type { Chain } from "../../../../../../../chains/types.js";
|
4
5
|
import type { ThirdwebClient } from "../../../../../../../client/client.js";
|
5
6
|
import { NATIVE_TOKEN_ADDRESS } from "../../../../../../../constants/addresses.js";
|
@@ -274,7 +275,17 @@ export function FiatScreenContent(props: {
|
|
274
275
|
data-disabled={disableSubmit}
|
275
276
|
disabled={disableSubmit}
|
276
277
|
fullWidth
|
277
|
-
onClick={
|
278
|
+
onClick={() => {
|
279
|
+
trackPayEvent({
|
280
|
+
event: "confirm_onramp_quote",
|
281
|
+
client: client,
|
282
|
+
walletAddress: payer.account.address,
|
283
|
+
walletType: payer.wallet.id,
|
284
|
+
toChainId: toChain.id,
|
285
|
+
toToken: isNativeToken(toToken) ? undefined : toToken.address,
|
286
|
+
});
|
287
|
+
handleSubmit();
|
288
|
+
}}
|
278
289
|
gap="xs"
|
279
290
|
>
|
280
291
|
{fiatQuoteQuery.isLoading ? (
|
@@ -398,6 +398,9 @@ function useOnRampScreenState(props: {
|
|
398
398
|
client: props.client,
|
399
399
|
walletAddress: props.payer.account.address,
|
400
400
|
walletType: props.payer.wallet.id,
|
401
|
+
toChainId: props.quote.onRampToken.token.chainId,
|
402
|
+
toToken: props.quote.onRampToken.token.tokenAddress,
|
403
|
+
amountWei: props.quote.onRampToken.amountWei,
|
401
404
|
});
|
402
405
|
setPopupWindow(popup);
|
403
406
|
addPendingTx({
|
@@ -679,11 +682,10 @@ function useSwapMutation(props: {
|
|
679
682
|
walletAddress: account.address,
|
680
683
|
walletType: props.payer.wallet.id,
|
681
684
|
fromToken: quote.swapDetails.fromToken.tokenAddress,
|
682
|
-
fromAmount: quote.swapDetails.fromAmountWei,
|
683
|
-
toToken: quote.swapDetails.toToken.tokenAddress,
|
684
|
-
toAmount: quote.swapDetails.toAmountWei,
|
685
685
|
chainId: quote.swapDetails.fromToken.chainId,
|
686
|
-
|
686
|
+
amountWei: quote.swapDetails.fromAmountWei,
|
687
|
+
toToken: quote.swapDetails.toToken.tokenAddress,
|
688
|
+
toChainId: quote.swapDetails.toToken.chainId,
|
687
689
|
});
|
688
690
|
|
689
691
|
const transaction = approve({
|
@@ -705,11 +707,10 @@ function useSwapMutation(props: {
|
|
705
707
|
walletAddress: account.address,
|
706
708
|
walletType: props.payer.wallet.id,
|
707
709
|
fromToken: quote.swapDetails.fromToken.tokenAddress,
|
708
|
-
|
710
|
+
amountWei: quote.swapDetails.fromAmountWei,
|
709
711
|
toToken: quote.swapDetails.toToken.tokenAddress,
|
710
|
-
toAmount: quote.swapDetails.toAmountWei,
|
711
712
|
chainId: quote.swapDetails.fromToken.chainId,
|
712
|
-
|
713
|
+
toChainId: quote.swapDetails.toToken.chainId,
|
713
714
|
});
|
714
715
|
}
|
715
716
|
|
@@ -719,11 +720,10 @@ function useSwapMutation(props: {
|
|
719
720
|
walletAddress: account.address,
|
720
721
|
walletType: props.payer.wallet.id,
|
721
722
|
fromToken: quote.swapDetails.fromToken.tokenAddress,
|
722
|
-
|
723
|
+
amountWei: quote.swapDetails.fromAmountWei,
|
723
724
|
toToken: quote.swapDetails.toToken.tokenAddress,
|
724
|
-
toAmount: quote.swapDetails.toAmountWei,
|
725
725
|
chainId: quote.swapDetails.fromToken.chainId,
|
726
|
-
|
726
|
+
toChainId: quote.swapDetails.toToken.chainId,
|
727
727
|
});
|
728
728
|
const tx = quote.transactionRequest;
|
729
729
|
let _swapTx: WaitForReceiptOptions;
|
@@ -754,11 +754,10 @@ function useSwapMutation(props: {
|
|
754
754
|
walletAddress: account.address,
|
755
755
|
walletType: props.payer.wallet.id,
|
756
756
|
fromToken: quote.swapDetails.fromToken.tokenAddress,
|
757
|
-
|
757
|
+
amountWei: quote.swapDetails.fromAmountWei,
|
758
758
|
toToken: quote.swapDetails.toToken.tokenAddress,
|
759
|
-
|
759
|
+
toChainId: quote.swapDetails.toToken.chainId,
|
760
760
|
chainId: quote.swapDetails.fromToken.chainId,
|
761
|
-
dstChainId: quote.swapDetails.toToken.chainId,
|
762
761
|
});
|
763
762
|
|
764
763
|
// do not add pending tx if the swap is part of fiat flow
|
@@ -220,11 +220,10 @@ export function SwapConfirmationScreen(props: {
|
|
220
220
|
walletAddress: account.address,
|
221
221
|
walletType: wallet.id,
|
222
222
|
fromToken: props.quote.swapDetails.fromToken.tokenAddress,
|
223
|
-
|
223
|
+
amountWei: props.quote.swapDetails.fromAmountWei,
|
224
224
|
toToken: props.quote.swapDetails.toToken.tokenAddress,
|
225
|
-
|
225
|
+
toChainId: props.quote.swapDetails.toToken.chainId,
|
226
226
|
chainId: props.quote.swapDetails.fromToken.chainId,
|
227
|
-
dstChainId: props.quote.swapDetails.toToken.chainId,
|
228
227
|
});
|
229
228
|
|
230
229
|
const transaction = approve({
|
@@ -250,11 +249,10 @@ export function SwapConfirmationScreen(props: {
|
|
250
249
|
walletAddress: account.address,
|
251
250
|
walletType: wallet.id,
|
252
251
|
fromToken: props.quote.swapDetails.fromToken.tokenAddress,
|
253
|
-
|
252
|
+
amountWei: props.quote.swapDetails.fromAmountWei,
|
254
253
|
toToken: props.quote.swapDetails.toToken.tokenAddress,
|
255
|
-
|
254
|
+
toChainId: props.quote.swapDetails.toToken.chainId,
|
256
255
|
chainId: props.quote.swapDetails.fromToken.chainId,
|
257
|
-
dstChainId: props.quote.swapDetails.toToken.chainId,
|
258
256
|
});
|
259
257
|
|
260
258
|
setStep("swap");
|
@@ -275,11 +273,10 @@ export function SwapConfirmationScreen(props: {
|
|
275
273
|
walletAddress: account.address,
|
276
274
|
walletType: wallet.id,
|
277
275
|
fromToken: props.quote.swapDetails.fromToken.tokenAddress,
|
278
|
-
|
276
|
+
amountWei: props.quote.swapDetails.fromAmountWei,
|
279
277
|
toToken: props.quote.swapDetails.toToken.tokenAddress,
|
280
|
-
|
278
|
+
toChainId: props.quote.swapDetails.toToken.chainId,
|
281
279
|
chainId: props.quote.swapDetails.fromToken.chainId,
|
282
|
-
dstChainId: props.quote.swapDetails.toToken.chainId,
|
283
280
|
});
|
284
281
|
const tx = props.quote.transactionRequest;
|
285
282
|
let _swapTx: WaitForReceiptOptions;
|
@@ -317,11 +314,10 @@ export function SwapConfirmationScreen(props: {
|
|
317
314
|
walletAddress: account.address,
|
318
315
|
walletType: wallet.id,
|
319
316
|
fromToken: props.quote.swapDetails.fromToken.tokenAddress,
|
320
|
-
|
317
|
+
amountWei: props.quote.swapDetails.fromAmountWei,
|
321
318
|
toToken: props.quote.swapDetails.toToken.tokenAddress,
|
322
|
-
|
319
|
+
toChainId: props.quote.swapDetails.toToken.chainId,
|
323
320
|
chainId: props.quote.swapDetails.fromToken.chainId,
|
324
|
-
dstChainId: props.quote.swapDetails.toToken.chainId,
|
325
321
|
});
|
326
322
|
|
327
323
|
// do not add pending tx if the swap is part of fiat flow
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import { useQuery } from "@tanstack/react-query";
|
2
2
|
import { useState } from "react";
|
3
|
+
import { trackPayEvent } from "../../../../../../../analytics/track/pay.js";
|
3
4
|
import type { Chain } from "../../../../../../../chains/types.js";
|
4
5
|
import { getCachedChain } from "../../../../../../../chains/utils.js";
|
5
6
|
import type { ThirdwebClient } from "../../../../../../../client/client.js";
|
@@ -369,6 +370,18 @@ export function SwapScreenContent(props: {
|
|
369
370
|
onClick={async () => {
|
370
371
|
if (!disableContinue) {
|
371
372
|
showSwapFlow();
|
373
|
+
trackPayEvent({
|
374
|
+
event: "confirm_swap_quote",
|
375
|
+
client: client,
|
376
|
+
walletAddress: payer.account.address,
|
377
|
+
walletType: payer.wallet.id,
|
378
|
+
chainId: fromChain.id,
|
379
|
+
fromToken: isNativeToken(fromToken)
|
380
|
+
? undefined
|
381
|
+
: fromToken.address,
|
382
|
+
toChainId: toChain.id,
|
383
|
+
toToken: isNativeToken(toToken) ? undefined : toToken.address,
|
384
|
+
});
|
372
385
|
}
|
373
386
|
}}
|
374
387
|
gap="xs"
|
@@ -5,6 +5,7 @@ import {
|
|
5
5
|
Cross2Icon,
|
6
6
|
} from "@radix-ui/react-icons";
|
7
7
|
import { useQuery } from "@tanstack/react-query";
|
8
|
+
import { trackPayEvent } from "../../../../../../../analytics/track/pay.js";
|
8
9
|
import type { Chain } from "../../../../../../../chains/types.js";
|
9
10
|
import { getCachedChain } from "../../../../../../../chains/utils.js";
|
10
11
|
import type { ThirdwebClient } from "../../../../../../../client/client.js";
|
@@ -27,6 +28,7 @@ import {
|
|
27
28
|
useChainName,
|
28
29
|
} from "../../../../../../core/hooks/others/useChainQuery.js";
|
29
30
|
import { useActiveAccount } from "../../../../../../core/hooks/wallets/useActiveAccount.js";
|
31
|
+
import { useActiveWallet } from "../../../../../../core/hooks/wallets/useActiveWallet.js";
|
30
32
|
import { useConnectedWallets } from "../../../../../../core/hooks/wallets/useConnectedWallets.js";
|
31
33
|
import { useDisconnect } from "../../../../../../core/hooks/wallets/useDisconnect.js";
|
32
34
|
import type {
|
@@ -73,6 +75,7 @@ export function TokenSelectorScreen(props: {
|
|
73
75
|
}) {
|
74
76
|
const connectedWallets = useConnectedWallets();
|
75
77
|
const activeAccount = useActiveAccount();
|
78
|
+
const activeWallet = useActiveWallet();
|
76
79
|
const chainInfo = useChainMetadata(props.toChain);
|
77
80
|
const theme = useCustomTheme();
|
78
81
|
|
@@ -233,7 +236,21 @@ export function TokenSelectorScreen(props: {
|
|
233
236
|
balances={balances}
|
234
237
|
client={props.client}
|
235
238
|
address={address}
|
236
|
-
onClick={
|
239
|
+
onClick={(wallet, token, chain) => {
|
240
|
+
trackPayEvent({
|
241
|
+
event: "choose_payment_method_token",
|
242
|
+
client: props.client,
|
243
|
+
walletAddress: activeAccount?.address,
|
244
|
+
walletType: activeWallet?.id,
|
245
|
+
chainId: chain.id,
|
246
|
+
fromToken: isNativeToken(token) ? undefined : token.address,
|
247
|
+
toToken: isNativeToken(props.toToken)
|
248
|
+
? undefined
|
249
|
+
: props.toToken.address,
|
250
|
+
toChainId: props.toChain.id,
|
251
|
+
});
|
252
|
+
props.onSelectToken(wallet, token, chain);
|
253
|
+
}}
|
237
254
|
/>
|
238
255
|
);
|
239
256
|
})}
|
@@ -241,7 +258,19 @@ export function TokenSelectorScreen(props: {
|
|
241
258
|
<Button
|
242
259
|
variant="secondary"
|
243
260
|
fullWidth
|
244
|
-
onClick={
|
261
|
+
onClick={() => {
|
262
|
+
trackPayEvent({
|
263
|
+
event: "choose_payment_method_another_wallet",
|
264
|
+
client: props.client,
|
265
|
+
walletAddress: activeAccount?.address,
|
266
|
+
walletType: activeWallet?.id,
|
267
|
+
toChainId: props.toChain.id,
|
268
|
+
toToken: isNativeToken(props.toToken)
|
269
|
+
? undefined
|
270
|
+
: props.toToken.address,
|
271
|
+
});
|
272
|
+
props.onConnect();
|
273
|
+
}}
|
245
274
|
bg="tertiaryBg"
|
246
275
|
style={{
|
247
276
|
border: `1px solid ${theme.colors.borderColor}`,
|
@@ -265,7 +294,19 @@ export function TokenSelectorScreen(props: {
|
|
265
294
|
<Button
|
266
295
|
variant="secondary"
|
267
296
|
fullWidth
|
268
|
-
onClick={
|
297
|
+
onClick={() => {
|
298
|
+
trackPayEvent({
|
299
|
+
event: "choose_payment_method_with_card",
|
300
|
+
client: props.client,
|
301
|
+
walletAddress: activeAccount?.address,
|
302
|
+
walletType: activeWallet?.id,
|
303
|
+
toChainId: props.toChain.id,
|
304
|
+
toToken: isNativeToken(props.toToken)
|
305
|
+
? undefined
|
306
|
+
: props.toToken.address,
|
307
|
+
});
|
308
|
+
props.onPayWithFiat();
|
309
|
+
}}
|
269
310
|
bg="tertiaryBg"
|
270
311
|
style={{
|
271
312
|
border: `1px solid ${theme.colors.borderColor}`,
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import { CheckCircledIcon } from "@radix-ui/react-icons";
|
2
2
|
import { useQuery } from "@tanstack/react-query";
|
3
3
|
import { useMemo, useState } from "react";
|
4
|
+
import { trackPayEvent } from "../../../../../../../analytics/track/pay.js";
|
4
5
|
import type { Chain } from "../../../../../../../chains/types.js";
|
5
6
|
import { getCachedChain } from "../../../../../../../chains/utils.js";
|
6
7
|
import type { ThirdwebClient } from "../../../../../../../client/client.js";
|
@@ -309,6 +310,14 @@ export function TransferConfirmationScreen(
|
|
309
310
|
}),
|
310
311
|
}),
|
311
312
|
]);
|
313
|
+
trackPayEvent({
|
314
|
+
client: props.client,
|
315
|
+
walletAddress: payer.account.address,
|
316
|
+
walletType: payer.wallet.id,
|
317
|
+
toChainId: chain.id,
|
318
|
+
toToken: isNativeToken(token) ? undefined : token.address,
|
319
|
+
event: "transfer_confirmation_success_transaction_mode",
|
320
|
+
});
|
312
321
|
// its the last step before the transaction, so propagate onPurchaseSuccess here
|
313
322
|
props.onSuccess?.(
|
314
323
|
transferBuyWithCryptoQuote({
|
@@ -353,6 +362,14 @@ export function TransferConfirmationScreen(
|
|
353
362
|
BigInt(transferResponse.approvalData.amountWei)
|
354
363
|
) {
|
355
364
|
setStep("approve");
|
365
|
+
trackPayEvent({
|
366
|
+
client: props.client,
|
367
|
+
walletAddress: payer.account.address,
|
368
|
+
walletType: payer.wallet.id,
|
369
|
+
toChainId: chain.id,
|
370
|
+
toToken: isNativeToken(token) ? undefined : token.address,
|
371
|
+
event: "prompt_transfer_approval",
|
372
|
+
});
|
356
373
|
const transaction = approve({
|
357
374
|
contract: getContract({
|
358
375
|
client: client,
|
@@ -372,9 +389,26 @@ export function TransferConfirmationScreen(
|
|
372
389
|
account: props.payer.account,
|
373
390
|
transaction,
|
374
391
|
});
|
392
|
+
trackPayEvent({
|
393
|
+
client: props.client,
|
394
|
+
walletAddress: payer.account.address,
|
395
|
+
walletType: payer.wallet.id,
|
396
|
+
toChainId: chain.id,
|
397
|
+
toToken: isNativeToken(token) ? undefined : token.address,
|
398
|
+
event: "transfer_approval_success",
|
399
|
+
});
|
375
400
|
}
|
376
401
|
}
|
377
402
|
|
403
|
+
trackPayEvent({
|
404
|
+
client: props.client,
|
405
|
+
walletAddress: payer.account.address,
|
406
|
+
walletType: payer.wallet.id,
|
407
|
+
toChainId: chain.id,
|
408
|
+
toToken: isNativeToken(token) ? undefined : token.address,
|
409
|
+
event: "prompt_transfer_confirmation",
|
410
|
+
});
|
411
|
+
|
378
412
|
setStep("transfer");
|
379
413
|
// execute the transfer
|
380
414
|
const transaction = transferResponse.transactionRequest;
|
@@ -385,6 +419,15 @@ export function TransferConfirmationScreen(
|
|
385
419
|
// switches to the status polling screen
|
386
420
|
setTransactionHash(tx.transactionHash);
|
387
421
|
setStatus({ id: "idle" });
|
422
|
+
|
423
|
+
trackPayEvent({
|
424
|
+
client: props.client,
|
425
|
+
walletAddress: payer.account.address,
|
426
|
+
walletType: payer.wallet.id,
|
427
|
+
toChainId: chain.id,
|
428
|
+
toToken: isNativeToken(token) ? undefined : token.address,
|
429
|
+
event: "transfer_confirmation_success",
|
430
|
+
});
|
388
431
|
}
|
389
432
|
// biome-ignore lint/suspicious/noExplicitAny: catch multiple errors
|
390
433
|
} catch (e: any) {
|