@b3dotfun/sdk 0.0.24 → 0.0.25

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 (253) hide show
  1. package/README.md +3 -8
  2. package/dist/cjs/anyspend/constants/index.d.ts +0 -1
  3. package/dist/cjs/anyspend/constants/index.js +1 -2
  4. package/dist/cjs/anyspend/react/components/AnySpend.d.ts +0 -1
  5. package/dist/cjs/anyspend/react/components/AnySpend.js +11 -15
  6. package/dist/cjs/anyspend/react/components/AnySpendBondKit.js +1 -1
  7. package/dist/cjs/anyspend/react/components/AnySpendBuySpin.d.ts +1 -2
  8. package/dist/cjs/anyspend/react/components/AnySpendBuySpin.js +2 -2
  9. package/dist/cjs/anyspend/react/components/AnySpendCustom.d.ts +0 -1
  10. package/dist/cjs/anyspend/react/components/AnySpendCustom.js +9 -10
  11. package/dist/cjs/anyspend/react/components/AnySpendNFT.d.ts +1 -2
  12. package/dist/cjs/anyspend/react/components/AnySpendNFT.js +2 -2
  13. package/dist/cjs/anyspend/react/components/AnySpendStakeB3.d.ts +1 -2
  14. package/dist/cjs/anyspend/react/components/AnySpendStakeB3.js +2 -2
  15. package/dist/cjs/anyspend/react/components/AnySpendTournament.d.ts +0 -2
  16. package/dist/cjs/anyspend/react/components/AnySpendTournament.js +2 -2
  17. package/dist/cjs/anyspend/react/components/AnyspendSignatureMint.js +1 -1
  18. package/dist/cjs/anyspend/react/components/common/CryptoPaymentMethod.js +4 -4
  19. package/dist/cjs/anyspend/react/components/common/FiatPaymentMethod.d.ts +1 -2
  20. package/dist/cjs/anyspend/react/components/common/FiatPaymentMethod.js +5 -5
  21. package/dist/cjs/anyspend/react/components/common/OrderDetails.d.ts +0 -1
  22. package/dist/cjs/anyspend/react/components/common/OrderDetails.js +2 -2
  23. package/dist/cjs/anyspend/react/components/common/OrderHistory.js +1 -2
  24. package/dist/cjs/anyspend/react/components/common/OrderStatus.js +9 -3
  25. package/dist/cjs/anyspend/react/components/common/PanelOnramp.js +2 -2
  26. package/dist/cjs/anyspend/react/components/common/PanelOnrampPayment.d.ts +0 -1
  27. package/dist/cjs/anyspend/react/components/common/PanelOnrampPayment.js +2 -3
  28. package/dist/cjs/anyspend/react/components/common/PaymentStripeWeb2.d.ts +1 -2
  29. package/dist/cjs/anyspend/react/components/common/PaymentStripeWeb2.js +2 -2
  30. package/dist/cjs/anyspend/react/components/common/PaymentVendorUI.d.ts +1 -2
  31. package/dist/cjs/anyspend/react/components/common/PaymentVendorUI.js +2 -2
  32. package/dist/cjs/anyspend/react/components/common/RecipientSelection.js +1 -1
  33. package/dist/cjs/anyspend/react/components/webview/WebviewOnrampPayment.js +2 -3
  34. package/dist/cjs/anyspend/react/hooks/useAnyspendCreateOnrampOrder.js +1 -2
  35. package/dist/cjs/anyspend/react/hooks/useAnyspendCreateOrder.d.ts +0 -1
  36. package/dist/cjs/anyspend/react/hooks/useAnyspendCreateOrder.js +1 -2
  37. package/dist/cjs/anyspend/react/hooks/useAnyspendOrderAndTransactions.d.ts +1 -1
  38. package/dist/cjs/anyspend/react/hooks/useAnyspendOrderAndTransactions.js +2 -2
  39. package/dist/cjs/anyspend/react/hooks/useAnyspendOrderHistory.d.ts +1 -1
  40. package/dist/cjs/anyspend/react/hooks/useAnyspendOrderHistory.js +2 -2
  41. package/dist/cjs/anyspend/react/hooks/useAnyspendQuote.d.ts +1 -2
  42. package/dist/cjs/anyspend/react/hooks/useAnyspendQuote.js +3 -3
  43. package/dist/cjs/anyspend/react/hooks/useAnyspendTokens.d.ts +1 -1
  44. package/dist/cjs/anyspend/react/hooks/useAnyspendTokens.js +2 -2
  45. package/dist/cjs/anyspend/react/hooks/useCoinbaseOnrampOptions.d.ts +1 -1
  46. package/dist/cjs/anyspend/react/hooks/useCoinbaseOnrampOptions.js +3 -3
  47. package/dist/cjs/anyspend/react/hooks/useGeoOnrampOptions.d.ts +1 -1
  48. package/dist/cjs/anyspend/react/hooks/useGeoOnrampOptions.js +3 -3
  49. package/dist/cjs/anyspend/react/hooks/useStripeClientSecret.d.ts +1 -1
  50. package/dist/cjs/anyspend/react/hooks/useStripeClientSecret.js +3 -3
  51. package/dist/cjs/anyspend/react/hooks/useStripeSupport.d.ts +1 -1
  52. package/dist/cjs/anyspend/react/hooks/useStripeSupport.js +3 -3
  53. package/dist/cjs/anyspend/services/anyspend.d.ts +9 -10
  54. package/dist/cjs/anyspend/services/anyspend.js +18 -18
  55. package/dist/cjs/global-account/react/components/B3DynamicModal.js +13 -15
  56. package/dist/cjs/global-account/react/components/B3Provider/B3Provider.d.ts +1 -2
  57. package/dist/cjs/global-account/react/components/B3Provider/B3Provider.js +2 -2
  58. package/dist/cjs/global-account/react/components/B3Provider/B3Provider.native.d.ts +1 -2
  59. package/dist/cjs/global-account/react/components/B3Provider/B3Provider.native.js +1 -3
  60. package/dist/cjs/global-account/react/components/B3Provider/RelayKitProviderWrapper.d.ts +1 -2
  61. package/dist/cjs/global-account/react/components/B3Provider/RelayKitProviderWrapper.js +4 -4
  62. package/dist/cjs/global-account/react/components/ManageAccount/ManageAccount.d.ts +1 -0
  63. package/dist/cjs/global-account/react/components/ManageAccount/ManageAccount.js +31 -20
  64. package/dist/cjs/global-account/react/components/SignInWithB3/steps/LoginStep.js +2 -2
  65. package/dist/cjs/global-account/react/components/custom/CopyToClipboard.d.ts +2 -1
  66. package/dist/cjs/global-account/react/components/custom/CopyToClipboard.js +3 -2
  67. package/dist/cjs/global-account/react/components/icons/BankIcon.d.ts +9 -0
  68. package/dist/cjs/global-account/react/components/icons/BankIcon.js +8 -0
  69. package/dist/cjs/global-account/react/components/icons/EditIcon.d.ts +9 -0
  70. package/dist/cjs/global-account/react/components/icons/EditIcon.js +8 -0
  71. package/dist/cjs/global-account/react/components/icons/SignOutIcon.d.ts +9 -0
  72. package/dist/cjs/global-account/react/components/icons/SignOutIcon.js +8 -0
  73. package/dist/cjs/global-account/react/components/icons/SwapIcon.d.ts +9 -0
  74. package/dist/cjs/global-account/react/components/icons/SwapIcon.js +8 -0
  75. package/dist/cjs/global-account/react/hooks/useB3BalanceFromAddresses.d.ts +6 -0
  76. package/dist/cjs/global-account/react/hooks/useB3BalanceFromAddresses.js +11 -0
  77. package/dist/cjs/global-account/react/hooks/useNativeBalance.d.ts +6 -0
  78. package/dist/cjs/global-account/react/hooks/useNativeBalance.js +39 -6
  79. package/dist/cjs/global-account/react/hooks/useTokenPrice.d.ts +10 -0
  80. package/dist/cjs/global-account/react/hooks/useTokenPrice.js +81 -2
  81. package/dist/cjs/global-account/react/hooks/useUnifiedChainSwitchAndExecute.js +6 -1
  82. package/dist/cjs/global-account/react/stores/useModalStore.d.ts +1 -1
  83. package/dist/esm/anyspend/constants/index.d.ts +0 -1
  84. package/dist/esm/anyspend/constants/index.js +0 -1
  85. package/dist/esm/anyspend/react/components/AnySpend.d.ts +0 -1
  86. package/dist/esm/anyspend/react/components/AnySpend.js +13 -17
  87. package/dist/esm/anyspend/react/components/AnySpendBondKit.js +1 -1
  88. package/dist/esm/anyspend/react/components/AnySpendBuySpin.d.ts +1 -2
  89. package/dist/esm/anyspend/react/components/AnySpendBuySpin.js +2 -2
  90. package/dist/esm/anyspend/react/components/AnySpendCustom.d.ts +0 -1
  91. package/dist/esm/anyspend/react/components/AnySpendCustom.js +10 -11
  92. package/dist/esm/anyspend/react/components/AnySpendNFT.d.ts +1 -2
  93. package/dist/esm/anyspend/react/components/AnySpendNFT.js +2 -2
  94. package/dist/esm/anyspend/react/components/AnySpendStakeB3.d.ts +1 -2
  95. package/dist/esm/anyspend/react/components/AnySpendStakeB3.js +2 -2
  96. package/dist/esm/anyspend/react/components/AnySpendTournament.d.ts +0 -2
  97. package/dist/esm/anyspend/react/components/AnySpendTournament.js +2 -2
  98. package/dist/esm/anyspend/react/components/AnyspendSignatureMint.js +1 -1
  99. package/dist/esm/anyspend/react/components/common/CryptoPaymentMethod.js +4 -4
  100. package/dist/esm/anyspend/react/components/common/FiatPaymentMethod.d.ts +1 -2
  101. package/dist/esm/anyspend/react/components/common/FiatPaymentMethod.js +5 -5
  102. package/dist/esm/anyspend/react/components/common/OrderDetails.d.ts +0 -1
  103. package/dist/esm/anyspend/react/components/common/OrderDetails.js +2 -2
  104. package/dist/esm/anyspend/react/components/common/OrderHistory.js +1 -2
  105. package/dist/esm/anyspend/react/components/common/OrderStatus.js +7 -1
  106. package/dist/esm/anyspend/react/components/common/PanelOnramp.js +2 -2
  107. package/dist/esm/anyspend/react/components/common/PanelOnrampPayment.d.ts +0 -1
  108. package/dist/esm/anyspend/react/components/common/PanelOnrampPayment.js +2 -3
  109. package/dist/esm/anyspend/react/components/common/PaymentStripeWeb2.d.ts +1 -2
  110. package/dist/esm/anyspend/react/components/common/PaymentStripeWeb2.js +2 -2
  111. package/dist/esm/anyspend/react/components/common/PaymentVendorUI.d.ts +1 -2
  112. package/dist/esm/anyspend/react/components/common/PaymentVendorUI.js +2 -2
  113. package/dist/esm/anyspend/react/components/common/RecipientSelection.js +1 -1
  114. package/dist/esm/anyspend/react/components/webview/WebviewOnrampPayment.js +2 -3
  115. package/dist/esm/anyspend/react/hooks/useAnyspendCreateOnrampOrder.js +1 -2
  116. package/dist/esm/anyspend/react/hooks/useAnyspendCreateOrder.d.ts +0 -1
  117. package/dist/esm/anyspend/react/hooks/useAnyspendCreateOrder.js +1 -2
  118. package/dist/esm/anyspend/react/hooks/useAnyspendOrderAndTransactions.d.ts +1 -1
  119. package/dist/esm/anyspend/react/hooks/useAnyspendOrderAndTransactions.js +2 -2
  120. package/dist/esm/anyspend/react/hooks/useAnyspendOrderHistory.d.ts +1 -1
  121. package/dist/esm/anyspend/react/hooks/useAnyspendOrderHistory.js +2 -2
  122. package/dist/esm/anyspend/react/hooks/useAnyspendQuote.d.ts +1 -2
  123. package/dist/esm/anyspend/react/hooks/useAnyspendQuote.js +3 -3
  124. package/dist/esm/anyspend/react/hooks/useAnyspendTokens.d.ts +1 -1
  125. package/dist/esm/anyspend/react/hooks/useAnyspendTokens.js +2 -2
  126. package/dist/esm/anyspend/react/hooks/useCoinbaseOnrampOptions.d.ts +1 -1
  127. package/dist/esm/anyspend/react/hooks/useCoinbaseOnrampOptions.js +3 -3
  128. package/dist/esm/anyspend/react/hooks/useGeoOnrampOptions.d.ts +1 -1
  129. package/dist/esm/anyspend/react/hooks/useGeoOnrampOptions.js +3 -3
  130. package/dist/esm/anyspend/react/hooks/useStripeClientSecret.d.ts +1 -1
  131. package/dist/esm/anyspend/react/hooks/useStripeClientSecret.js +3 -3
  132. package/dist/esm/anyspend/react/hooks/useStripeSupport.d.ts +1 -1
  133. package/dist/esm/anyspend/react/hooks/useStripeSupport.js +3 -3
  134. package/dist/esm/anyspend/services/anyspend.d.ts +9 -10
  135. package/dist/esm/anyspend/services/anyspend.js +19 -19
  136. package/dist/esm/global-account/react/components/B3DynamicModal.js +13 -15
  137. package/dist/esm/global-account/react/components/B3Provider/B3Provider.d.ts +1 -2
  138. package/dist/esm/global-account/react/components/B3Provider/B3Provider.js +2 -2
  139. package/dist/esm/global-account/react/components/B3Provider/B3Provider.native.d.ts +1 -2
  140. package/dist/esm/global-account/react/components/B3Provider/B3Provider.native.js +1 -3
  141. package/dist/esm/global-account/react/components/B3Provider/RelayKitProviderWrapper.d.ts +1 -2
  142. package/dist/esm/global-account/react/components/B3Provider/RelayKitProviderWrapper.js +5 -5
  143. package/dist/esm/global-account/react/components/ManageAccount/ManageAccount.d.ts +1 -0
  144. package/dist/esm/global-account/react/components/ManageAccount/ManageAccount.js +33 -22
  145. package/dist/esm/global-account/react/components/SignInWithB3/steps/LoginStep.js +2 -2
  146. package/dist/esm/global-account/react/components/custom/CopyToClipboard.d.ts +2 -1
  147. package/dist/esm/global-account/react/components/custom/CopyToClipboard.js +4 -3
  148. package/dist/esm/global-account/react/components/icons/BankIcon.d.ts +9 -0
  149. package/dist/esm/global-account/react/components/icons/BankIcon.js +5 -0
  150. package/dist/esm/global-account/react/components/icons/EditIcon.d.ts +9 -0
  151. package/dist/esm/global-account/react/components/icons/EditIcon.js +5 -0
  152. package/dist/esm/global-account/react/components/icons/SignOutIcon.d.ts +9 -0
  153. package/dist/esm/global-account/react/components/icons/SignOutIcon.js +5 -0
  154. package/dist/esm/global-account/react/components/icons/SwapIcon.d.ts +9 -0
  155. package/dist/esm/global-account/react/components/icons/SwapIcon.js +5 -0
  156. package/dist/esm/global-account/react/hooks/useB3BalanceFromAddresses.d.ts +6 -0
  157. package/dist/esm/global-account/react/hooks/useB3BalanceFromAddresses.js +11 -0
  158. package/dist/esm/global-account/react/hooks/useNativeBalance.d.ts +6 -0
  159. package/dist/esm/global-account/react/hooks/useNativeBalance.js +39 -6
  160. package/dist/esm/global-account/react/hooks/useTokenPrice.d.ts +10 -0
  161. package/dist/esm/global-account/react/hooks/useTokenPrice.js +78 -3
  162. package/dist/esm/global-account/react/hooks/useUnifiedChainSwitchAndExecute.js +6 -1
  163. package/dist/esm/global-account/react/stores/useModalStore.d.ts +1 -1
  164. package/dist/styles/index.css +1 -1
  165. package/dist/types/anyspend/constants/index.d.ts +0 -1
  166. package/dist/types/anyspend/react/components/AnySpend.d.ts +0 -1
  167. package/dist/types/anyspend/react/components/AnySpendBuySpin.d.ts +1 -2
  168. package/dist/types/anyspend/react/components/AnySpendCustom.d.ts +0 -1
  169. package/dist/types/anyspend/react/components/AnySpendNFT.d.ts +1 -2
  170. package/dist/types/anyspend/react/components/AnySpendStakeB3.d.ts +1 -2
  171. package/dist/types/anyspend/react/components/AnySpendTournament.d.ts +0 -2
  172. package/dist/types/anyspend/react/components/common/FiatPaymentMethod.d.ts +1 -2
  173. package/dist/types/anyspend/react/components/common/OrderDetails.d.ts +0 -1
  174. package/dist/types/anyspend/react/components/common/PanelOnrampPayment.d.ts +0 -1
  175. package/dist/types/anyspend/react/components/common/PaymentStripeWeb2.d.ts +1 -2
  176. package/dist/types/anyspend/react/components/common/PaymentVendorUI.d.ts +1 -2
  177. package/dist/types/anyspend/react/hooks/useAnyspendCreateOrder.d.ts +0 -1
  178. package/dist/types/anyspend/react/hooks/useAnyspendOrderAndTransactions.d.ts +1 -1
  179. package/dist/types/anyspend/react/hooks/useAnyspendOrderHistory.d.ts +1 -1
  180. package/dist/types/anyspend/react/hooks/useAnyspendQuote.d.ts +1 -2
  181. package/dist/types/anyspend/react/hooks/useAnyspendTokens.d.ts +1 -1
  182. package/dist/types/anyspend/react/hooks/useCoinbaseOnrampOptions.d.ts +1 -1
  183. package/dist/types/anyspend/react/hooks/useGeoOnrampOptions.d.ts +1 -1
  184. package/dist/types/anyspend/react/hooks/useStripeClientSecret.d.ts +1 -1
  185. package/dist/types/anyspend/react/hooks/useStripeSupport.d.ts +1 -1
  186. package/dist/types/anyspend/services/anyspend.d.ts +9 -10
  187. package/dist/types/global-account/react/components/B3Provider/B3Provider.d.ts +1 -2
  188. package/dist/types/global-account/react/components/B3Provider/B3Provider.native.d.ts +1 -2
  189. package/dist/types/global-account/react/components/B3Provider/RelayKitProviderWrapper.d.ts +1 -2
  190. package/dist/types/global-account/react/components/ManageAccount/ManageAccount.d.ts +1 -0
  191. package/dist/types/global-account/react/components/custom/CopyToClipboard.d.ts +2 -1
  192. package/dist/types/global-account/react/components/icons/BankIcon.d.ts +9 -0
  193. package/dist/types/global-account/react/components/icons/EditIcon.d.ts +9 -0
  194. package/dist/types/global-account/react/components/icons/SignOutIcon.d.ts +9 -0
  195. package/dist/types/global-account/react/components/icons/SwapIcon.d.ts +9 -0
  196. package/dist/types/global-account/react/hooks/useB3BalanceFromAddresses.d.ts +6 -0
  197. package/dist/types/global-account/react/hooks/useNativeBalance.d.ts +6 -0
  198. package/dist/types/global-account/react/hooks/useTokenPrice.d.ts +10 -0
  199. package/dist/types/global-account/react/stores/useModalStore.d.ts +1 -1
  200. package/package.json +2 -1
  201. package/src/anyspend/constants/index.ts +0 -1
  202. package/src/anyspend/docs/components.md +1 -5
  203. package/src/anyspend/docs/error-handling.md +47 -47
  204. package/src/anyspend/docs/examples.md +29 -29
  205. package/src/anyspend/docs/hooks.md +22 -27
  206. package/src/anyspend/docs/installation.md +1 -5
  207. package/src/anyspend/react/components/AnySpend.tsx +8 -28
  208. package/src/anyspend/react/components/AnySpendBondKit.tsx +0 -1
  209. package/src/anyspend/react/components/AnySpendBuySpin.tsx +0 -3
  210. package/src/anyspend/react/components/AnySpendCustom.tsx +8 -16
  211. package/src/anyspend/react/components/AnySpendNFT.tsx +0 -3
  212. package/src/anyspend/react/components/AnySpendStakeB3.tsx +0 -3
  213. package/src/anyspend/react/components/AnySpendTournament.tsx +0 -4
  214. package/src/anyspend/react/components/AnyspendSignatureMint.tsx +0 -1
  215. package/src/anyspend/react/components/common/CryptoPaymentMethod.tsx +7 -7
  216. package/src/anyspend/react/components/common/FiatPaymentMethod.tsx +5 -7
  217. package/src/anyspend/react/components/common/OrderDetails.tsx +1 -3
  218. package/src/anyspend/react/components/common/OrderHistory.tsx +1 -3
  219. package/src/anyspend/react/components/common/OrderStatus.tsx +7 -1
  220. package/src/anyspend/react/components/common/PanelOnramp.tsx +2 -2
  221. package/src/anyspend/react/components/common/PanelOnrampPayment.tsx +1 -4
  222. package/src/anyspend/react/components/common/PaymentStripeWeb2.tsx +1 -3
  223. package/src/anyspend/react/components/common/PaymentVendorUI.tsx +2 -3
  224. package/src/anyspend/react/components/common/RecipientSelection.tsx +1 -1
  225. package/src/anyspend/react/components/webview/WebviewOnrampPayment.tsx +1 -3
  226. package/src/anyspend/react/hooks/useAnyspendCreateOnrampOrder.ts +0 -2
  227. package/src/anyspend/react/hooks/useAnyspendCreateOrder.ts +1 -13
  228. package/src/anyspend/react/hooks/useAnyspendOrderAndTransactions.ts +2 -2
  229. package/src/anyspend/react/hooks/useAnyspendOrderHistory.ts +2 -7
  230. package/src/anyspend/react/hooks/useAnyspendQuote.ts +3 -4
  231. package/src/anyspend/react/hooks/useAnyspendTokens.ts +2 -2
  232. package/src/anyspend/react/hooks/useCoinbaseOnrampOptions.ts +3 -8
  233. package/src/anyspend/react/hooks/useGeoOnrampOptions.ts +2 -3
  234. package/src/anyspend/react/hooks/useStripeClientSecret.ts +3 -3
  235. package/src/anyspend/react/hooks/useStripeSupport.ts +3 -8
  236. package/src/anyspend/services/anyspend.ts +19 -45
  237. package/src/global-account/react/components/B3DynamicModal.tsx +66 -39
  238. package/src/global-account/react/components/B3Provider/B3Provider.native.tsx +1 -4
  239. package/src/global-account/react/components/B3Provider/B3Provider.tsx +1 -3
  240. package/src/global-account/react/components/B3Provider/RelayKitProviderWrapper.tsx +4 -6
  241. package/src/global-account/react/components/ManageAccount/ManageAccount.tsx +309 -137
  242. package/src/global-account/react/components/SignInWithB3/steps/LoginStep.tsx +4 -3
  243. package/src/global-account/react/components/custom/CopyToClipboard.tsx +7 -4
  244. package/src/global-account/react/components/icons/BankIcon.tsx +38 -0
  245. package/src/global-account/react/components/icons/EditIcon.tsx +33 -0
  246. package/src/global-account/react/components/icons/SignOutIcon.tsx +28 -0
  247. package/src/global-account/react/components/icons/SwapIcon.tsx +41 -0
  248. package/src/global-account/react/hooks/useB3BalanceFromAddresses.ts +18 -0
  249. package/src/global-account/react/hooks/useNativeBalance.tsx +51 -6
  250. package/src/global-account/react/hooks/useTokenPrice.tsx +138 -3
  251. package/src/global-account/react/hooks/useUnifiedChainSwitchAndExecute.ts +9 -3
  252. package/src/global-account/react/stores/useModalStore.ts +1 -1
  253. package/src/styles/index.css +328 -0
@@ -18,7 +18,7 @@ enum OrderStatus {
18
18
  // Processing States
19
19
  SENDING_TOKEN_FROM_VAULT = "sending_token_from_vault",
20
20
  RELAY = "relay",
21
-
21
+
22
22
  // Success States
23
23
  EXECUTED = "executed",
24
24
 
@@ -90,13 +90,13 @@ function PaymentComponent() {
90
90
  const { createOrder, isCreatingOrder } = useAnyspendCreateOrder({
91
91
  onError: (error) => {
92
92
  console.error("Payment failed:", error);
93
-
93
+
94
94
  // Handle specific errors
95
95
  switch (error.message) {
96
96
  case "INSUFFICIENT_BALANCE":
97
97
  setError("Insufficient balance. Please add funds to your wallet.");
98
98
  break;
99
-
99
+
100
100
  case "SLIPPAGE":
101
101
  if (retryCount < 3) {
102
102
  setError("Price moved unfavorably. Retrying...");
@@ -108,16 +108,16 @@ function PaymentComponent() {
108
108
  setError("Price too volatile. Please try again later.");
109
109
  }
110
110
  break;
111
-
111
+
112
112
  case "NETWORK_ERROR":
113
113
  setError("Network issue. Please check your connection and try again.");
114
114
  break;
115
-
115
+
116
116
  case "QUOTE_EXPIRED":
117
117
  setError("Price quote expired. Getting fresh quote...");
118
118
  refreshQuote();
119
119
  break;
120
-
120
+
121
121
  default:
122
122
  setError("Payment failed. Please try again or contact support.");
123
123
  }
@@ -129,7 +129,7 @@ function PaymentComponent() {
129
129
  timestamp: new Date().toISOString(),
130
130
  });
131
131
  },
132
-
132
+
133
133
  onSuccess: () => {
134
134
  setError(null);
135
135
  setRetryCount(0);
@@ -145,9 +145,9 @@ function PaymentComponent() {
145
145
  <button onClick={() => setError(null)}>Dismiss</button>
146
146
  </div>
147
147
  )}
148
-
149
- <button
150
- onClick={handlePayment}
148
+
149
+ <button
150
+ onClick={handlePayment}
151
151
  disabled={isCreatingOrder}
152
152
  >
153
153
  {isCreatingOrder ? "Processing..." : "Pay Now"}
@@ -163,8 +163,8 @@ function PaymentComponent() {
163
163
  import { useAnyspendOrderAndTransactions } from "@b3dotfun/sdk/anyspend";
164
164
 
165
165
  function OrderStatusMonitor({ orderId }: { orderId: string }) {
166
- const { orderAndTransactions, getOrderAndTransactionsError } =
167
- useAnyspendOrderAndTransactions(true, orderId);
166
+ const { orderAndTransactions, getOrderAndTransactionsError } =
167
+ useAnyspendOrderAndTransactions(orderId);
168
168
 
169
169
  if (getOrderAndTransactionsError) {
170
170
  return (
@@ -194,7 +194,7 @@ function OrderStatusMonitor({ orderId }: { orderId: string }) {
194
194
  <h3>⏳ Waiting for payment confirmation</h3>
195
195
  <p>This usually takes 1-2 minutes. Please don't close this window.</p>
196
196
  {depositTxs.length > 0 && (
197
- <a
197
+ <a
198
198
  href={getExplorerUrl(depositTxs[0].txHash, depositTxs[0].chainId)}
199
199
  target="_blank"
200
200
  rel="noopener noreferrer"
@@ -225,7 +225,7 @@ function OrderStatusMonitor({ orderId }: { orderId: string }) {
225
225
  <h3>Transaction completed successfully!</h3>
226
226
  <p>Your order has been processed.</p>
227
227
  {executeTx && (
228
- <a
228
+ <a
229
229
  href={getExplorerUrl(executeTx.txHash, executeTx.chainId)}
230
230
  target="_blank"
231
231
  rel="noopener noreferrer"
@@ -265,7 +265,7 @@ function OrderStatusMonitor({ orderId }: { orderId: string }) {
265
265
  <h3>Refund processed</h3>
266
266
  <p>Your payment has been refunded automatically.</p>
267
267
  {refundTxs.length > 0 && (
268
- <a
268
+ <a
269
269
  href={getExplorerUrl(refundTxs[0].txHash, refundTxs[0].chainId)}
270
270
  target="_blank"
271
271
  rel="noopener noreferrer"
@@ -355,7 +355,7 @@ class AnySpendErrorBoundary extends Component<Props, State> {
355
355
 
356
356
  componentDidCatch(error: Error, errorInfo: ErrorInfo) {
357
357
  console.error("AnySpend Error Boundary caught an error:", error, errorInfo);
358
-
358
+
359
359
  // Report to error tracking service
360
360
  if (typeof window !== "undefined") {
361
361
  // Example: Sentry.captureException(error, { contexts: { errorInfo } });
@@ -370,9 +370,9 @@ class AnySpendErrorBoundary extends Component<Props, State> {
370
370
  if (this.state.hasError) {
371
371
  const FallbackComponent = this.props.fallback || DefaultErrorFallback;
372
372
  return (
373
- <FallbackComponent
374
- error={this.state.error!}
375
- resetError={this.resetError}
373
+ <FallbackComponent
374
+ error={this.state.error!}
375
+ resetError={this.resetError}
376
376
  />
377
377
  );
378
378
  }
@@ -433,42 +433,42 @@ function DiagnoseQuoteIssue() {
433
433
  // Check if tokens are valid
434
434
  const srcTokenValid = await validateToken(quoteRequest.srcTokenAddress, quoteRequest.srcChain);
435
435
  const dstTokenValid = await validateToken(quoteRequest.dstTokenAddress, quoteRequest.dstChain);
436
-
436
+
437
437
  if (!srcTokenValid) {
438
438
  setDiagnosis("Source token address is invalid or not supported");
439
439
  return;
440
440
  }
441
-
441
+
442
442
  if (!dstTokenValid) {
443
443
  setDiagnosis("Destination token address is invalid or not supported");
444
444
  return;
445
445
  }
446
-
446
+
447
447
  // Check if amount is within limits
448
448
  const amount = parseFloat(quoteRequest.amount);
449
449
  if (amount < MIN_SWAP_AMOUNT) {
450
450
  setDiagnosis(`Amount too small. Minimum: ${MIN_SWAP_AMOUNT}`);
451
451
  return;
452
452
  }
453
-
453
+
454
454
  if (amount > MAX_SWAP_AMOUNT) {
455
455
  setDiagnosis(`Amount too large. Maximum: ${MAX_SWAP_AMOUNT}`);
456
456
  return;
457
457
  }
458
-
458
+
459
459
  // Check if chain pair is supported
460
460
  const chainPairSupported = await checkChainPairSupport(
461
- quoteRequest.srcChain,
461
+ quoteRequest.srcChain,
462
462
  quoteRequest.dstChain
463
463
  );
464
-
464
+
465
465
  if (!chainPairSupported) {
466
466
  setDiagnosis("This chain pair is not currently supported");
467
467
  return;
468
468
  }
469
-
469
+
470
470
  setDiagnosis("All checks passed. Try refreshing the quote.");
471
-
471
+
472
472
  } catch (error) {
473
473
  setDiagnosis(`Network error: ${error.message}`);
474
474
  }
@@ -498,8 +498,8 @@ function DepositDiagnostics({ orderId }: { orderId: string }) {
498
498
 
499
499
  const diagnoseDespositIssue = async () => {
500
500
  try {
501
- const order = await anyspendService.getOrder(true, orderId);
502
-
501
+ const order = await anyspendService.getOrder(orderId);
502
+
503
503
  if (!order.depositAddress) {
504
504
  setDepositDiag({
505
505
  issue: "No deposit address generated",
@@ -507,11 +507,11 @@ function DepositDiagnostics({ orderId }: { orderId: string }) {
507
507
  });
508
508
  return;
509
509
  }
510
-
510
+
511
511
  // Check if payment was sent to correct address
512
512
  const expectedAddress = order.depositAddress;
513
513
  const userTxs = await getTransactionsToAddress(expectedAddress);
514
-
514
+
515
515
  if (userTxs.length === 0) {
516
516
  setDepositDiag({
517
517
  issue: "No payment received at deposit address",
@@ -519,11 +519,11 @@ function DepositDiagnostics({ orderId }: { orderId: string }) {
519
519
  });
520
520
  return;
521
521
  }
522
-
522
+
523
523
  // Check if amount matches
524
524
  const expectedAmount = order.srcAmount;
525
525
  const receivedAmount = userTxs[0].amount;
526
-
526
+
527
527
  if (receivedAmount !== expectedAmount) {
528
528
  setDepositDiag({
529
529
  issue: `Amount mismatch. Expected: ${expectedAmount}, Received: ${receivedAmount}`,
@@ -531,11 +531,11 @@ function DepositDiagnostics({ orderId }: { orderId: string }) {
531
531
  });
532
532
  return;
533
533
  }
534
-
534
+
535
535
  // Check transaction confirmations
536
536
  const confirmations = await getTransactionConfirmations(userTxs[0].hash);
537
537
  const requiredConfirmations = getRequiredConfirmations(order.srcChain);
538
-
538
+
539
539
  if (confirmations < requiredConfirmations) {
540
540
  setDepositDiag({
541
541
  issue: `Waiting for confirmations: ${confirmations}/${requiredConfirmations}`,
@@ -543,12 +543,12 @@ function DepositDiagnostics({ orderId }: { orderId: string }) {
543
543
  });
544
544
  return;
545
545
  }
546
-
546
+
547
547
  setDepositDiag({
548
548
  issue: "Payment detected but not processed",
549
549
  solution: "This may be a system delay. Contact support if it persists."
550
550
  });
551
-
551
+
552
552
  } catch (error) {
553
553
  setDepositDiag({
554
554
  issue: "Unable to diagnose",
@@ -562,7 +562,7 @@ function DepositDiagnostics({ orderId }: { orderId: string }) {
562
562
  <button onClick={diagnoseDespositIssue}>
563
563
  Diagnose Deposit Issue
564
564
  </button>
565
-
565
+
566
566
  {depositDiag && (
567
567
  <div className="diagnosis-result">
568
568
  <h4>Issue: {depositDiag.issue}</h4>
@@ -651,19 +651,19 @@ function DebugInfo({ orderId }: { orderId: string }) {
651
651
  userAgent: navigator.userAgent,
652
652
  url: window.location.href,
653
653
  orderId,
654
-
654
+
655
655
  // Network info
656
656
  connection: (navigator as any).connection,
657
-
657
+
658
658
  // Order data
659
- order: await anyspendService.getOrder(true, orderId),
660
-
659
+ order: await anyspendService.getOrder(orderId),
660
+
661
661
  // Browser storage
662
662
  localStorage: { ...localStorage },
663
-
663
+
664
664
  // Console errors
665
665
  recentErrors: getRecentConsoleErrors(),
666
-
666
+
667
667
  // SDK version
668
668
  sdkVersion: process.env.REACT_APP_SDK_VERSION,
669
669
  };
@@ -681,7 +681,7 @@ function DebugInfo({ orderId }: { orderId: string }) {
681
681
  <button onClick={collectDebugInfo}>
682
682
  Collect Debug Info
683
683
  </button>
684
-
684
+
685
685
  {debugData && (
686
686
  <div>
687
687
  <button onClick={copyDebugInfo}>
@@ -732,4 +732,4 @@ interface BugReport {
732
732
 
733
733
  - [View Installation Guide →](./installation.md)
734
734
  - [Explore Components →](./components.md)
735
- - [See Examples →](./examples.md)
735
+ - [See Examples →](./examples.md)
@@ -43,13 +43,13 @@ function TokenSwapPage() {
43
43
  onSuccess={(txHash) => {
44
44
  // Update user's portfolio
45
45
  toast.success("Swap completed successfully!");
46
-
46
+
47
47
  // Optional: Track analytics
48
48
  analytics.track("swap_completed", {
49
49
  txHash,
50
50
  userAddress,
51
51
  });
52
-
52
+
53
53
  // Refresh user balances
54
54
  queryClient.invalidateQueries(['user-balances', userAddress]);
55
55
  }}
@@ -80,7 +80,7 @@ function AdvancedSwapInterface() {
80
80
  amount: parseUnits(amount || "0", fromToken.decimals).toString(),
81
81
  }), [fromToken, toToken, amount]);
82
82
 
83
- const { anyspendQuote, isLoadingAnyspendQuote } = useAnyspendQuote(true, quoteRequest);
83
+ const { anyspendQuote, isLoadingAnyspendQuote } = useAnyspendQuote(quoteRequest);
84
84
 
85
85
  return (
86
86
  <div className="advanced-swap">
@@ -92,12 +92,12 @@ function AdvancedSwapInterface() {
92
92
  onTokenChange={setFromToken}
93
93
  onAmountChange={setAmount}
94
94
  />
95
-
95
+
96
96
  <SwapArrowButton onClick={() => {
97
97
  setFromToken(toToken);
98
98
  setToToken(fromToken);
99
99
  }} />
100
-
100
+
101
101
  <TokenInput
102
102
  label="To"
103
103
  token={toToken}
@@ -105,7 +105,7 @@ function AdvancedSwapInterface() {
105
105
  onTokenChange={setToToken}
106
106
  readOnly
107
107
  />
108
-
108
+
109
109
  {anyspendQuote && (
110
110
  <div className="quote-details">
111
111
  <div>Rate: 1 {fromToken.symbol} = {anyspendQuote.rate} {toToken.symbol}</div>
@@ -114,7 +114,7 @@ function AdvancedSwapInterface() {
114
114
  <div>Total: ${anyspendQuote.totalUsdCost}</div>
115
115
  </div>
116
116
  )}
117
-
117
+
118
118
  <button
119
119
  onClick={() => setIsSwapOpen(true)}
120
120
  disabled={isLoadingAnyspendQuote || !anyspendQuote}
@@ -172,7 +172,7 @@ function NFTCard({ nft }: { nft: NFTListing }) {
172
172
  <div className="price">
173
173
  {nft.priceFormatted} {nft.currency.symbol}
174
174
  </div>
175
-
175
+
176
176
  {isOwned ? (
177
177
  <div className="owned-badge">✅ Owned</div>
178
178
  ) : (
@@ -181,10 +181,10 @@ function NFTCard({ nft }: { nft: NFTListing }) {
181
181
  recipientAddress={userAddress}
182
182
  onSuccess={(txHash) => {
183
183
  setIsOwned(true);
184
-
184
+
185
185
  // Update user's NFT collection
186
186
  queryClient.invalidateQueries(['user-nfts', userAddress]);
187
-
187
+
188
188
  // Show success message with explorer link
189
189
  toast.success(
190
190
  <div>
@@ -224,8 +224,8 @@ function NFTMarketplace() {
224
224
  <div className="marketplace">
225
225
  <div className="nft-grid">
226
226
  {nfts.map((nft) => (
227
- <NFTCard
228
- key={nft.id}
227
+ <NFTCard
228
+ key={nft.id}
229
229
  nft={nft}
230
230
  onSelect={(selected) => {
231
231
  if (selected) {
@@ -237,7 +237,7 @@ function NFTMarketplace() {
237
237
  />
238
238
  ))}
239
239
  </div>
240
-
240
+
241
241
  {selectedNFTs.length > 0 && (
242
242
  <div className="bulk-purchase">
243
243
  <p>Selected: {selectedNFTs.length} NFTs</p>
@@ -267,9 +267,9 @@ function StakingPool({ pool }: { pool: StakingPool }) {
267
267
 
268
268
  const stakingCalldata = useMemo(() => {
269
269
  if (!stakeAmount) return "0x";
270
-
270
+
271
271
  const amountWei = parseUnits(stakeAmount, pool.token.decimals);
272
-
272
+
273
273
  return encodeFunctionData({
274
274
  abi: stakingPoolABI,
275
275
  functionName: "stake",
@@ -350,10 +350,10 @@ function StakingPool({ pool }: { pool: StakingPool }) {
350
350
  )}
351
351
  onSuccess={(txHash) => {
352
352
  toast.success("Staking successful!");
353
-
353
+
354
354
  // Update user's staking positions
355
355
  queryClient.invalidateQueries(['staking-positions', userAddress]);
356
-
356
+
357
357
  // Reset form
358
358
  setStakeAmount("");
359
359
  }}
@@ -401,7 +401,7 @@ function SpinWheel({ game }: { game: GameConfig }) {
401
401
  // Listen for spin result event
402
402
  listenForSpinResult(txHash).then((result) => {
403
403
  setSpinHistory([result, ...spinHistory]);
404
-
404
+
405
405
  if (result.isWinner) {
406
406
  toast.success(`You won ${result.prize.name}!`);
407
407
  } else {
@@ -435,7 +435,7 @@ import { AnySpendTournament } from "@b3dotfun/sdk/anyspend/react";
435
435
  function TournamentCard({ tournament }: { tournament: Tournament }) {
436
436
  const [userAddress] = useWallet();
437
437
  const [isRegistered, setIsRegistered] = useState(false);
438
-
438
+
439
439
  const timeUntilStart = tournament.startTime - Date.now();
440
440
  const isStartingSoon = timeUntilStart < 60 * 60 * 1000; // 1 hour
441
441
 
@@ -460,12 +460,12 @@ function TournamentCard({ tournament }: { tournament: Tournament }) {
460
460
  <h4>Prize Pool</h4>
461
461
  <p>{tournament.prizePool} {tournament.currency.symbol}</p>
462
462
  </div>
463
-
463
+
464
464
  <div className="participants">
465
465
  <h4>Participants</h4>
466
466
  <p>{tournament.currentParticipants} / {tournament.maxParticipants}</p>
467
467
  </div>
468
-
468
+
469
469
  <div className="entry-fee">
470
470
  <h4>Entry Fee</h4>
471
471
  <p>{tournament.entryFee} {tournament.currency.symbol}</p>
@@ -484,7 +484,7 @@ function TournamentCard({ tournament }: { tournament: Tournament }) {
484
484
  onSuccess={() => {
485
485
  setIsRegistered(true);
486
486
  toast.success("Successfully registered for tournament!");
487
-
487
+
488
488
  // Update tournament data
489
489
  queryClient.invalidateQueries(['tournament', tournament.id]);
490
490
  }}
@@ -523,14 +523,14 @@ function FiatOnramp({ targetToken }: { targetToken: Token }) {
523
523
  onSuccess={(txHash) => {
524
524
  // Welcome new user
525
525
  toast.success("Welcome to crypto! Your purchase was successful.");
526
-
526
+
527
527
  // Track onboarding completion
528
528
  analytics.track("onramp_completed", {
529
529
  userAddress,
530
530
  token: targetToken.symbol,
531
531
  txHash,
532
532
  });
533
-
533
+
534
534
  // Redirect to main app
535
535
  router.push("/dashboard");
536
536
  }}
@@ -557,7 +557,7 @@ function OnboardingWizard() {
557
557
  </div>
558
558
 
559
559
  {step === 1 && (
560
- <WalletConnectionStep
560
+ <WalletConnectionStep
561
561
  onConnect={(address) => {
562
562
  setUserAddress(address);
563
563
  setStep(2);
@@ -647,10 +647,10 @@ function CryptoCheckout({ order }: { order: Order }) {
647
647
  onSuccess={(txHash) => {
648
648
  // Process order fulfillment
649
649
  processOrder(order.id, txHash);
650
-
650
+
651
651
  // Send confirmation email
652
652
  sendOrderConfirmation(order, txHash);
653
-
653
+
654
654
  // Redirect to success page
655
655
  router.push(`/order-confirmation/${order.id}`);
656
656
  }}
@@ -680,7 +680,7 @@ function PortfolioRebalancer() {
680
680
  return (
681
681
  <div className="portfolio-rebalancer">
682
682
  <h2>Portfolio Rebalancing</h2>
683
-
683
+
684
684
  <div className="current-allocation">
685
685
  <h3>Current Allocation</h3>
686
686
  <AllocationChart balances={currentBalances} />
@@ -724,4 +724,4 @@ function PortfolioRebalancer() {
724
724
 
725
725
  - [Error Handling Guide →](./error-handling.md)
726
726
  - [Components Reference →](./components.md)
727
- - [Hooks Reference →](./hooks.md)
727
+ - [Hooks Reference →](./hooks.md)
@@ -16,14 +16,13 @@ const {
16
16
  isLoadingAnyspendQuote,
17
17
  getAnyspendQuoteError,
18
18
  refetchAnyspendQuote
19
- } = useAnyspendQuote(isMainnet, quoteRequest);
19
+ } = useAnyspendQuote(quoteRequest);
20
20
  ```
21
21
 
22
22
  #### Parameters
23
23
 
24
24
  | Parameter | Type | Description |
25
25
  |-----------|------|-------------|
26
- | `isMainnet` | `boolean` | Use mainnet or testnet environment |
27
26
  | `quoteRequest` | `QuoteRequest` | Quote configuration object |
28
27
 
29
28
  #### QuoteRequest Interface
@@ -63,8 +62,8 @@ function SwapQuote() {
63
62
  amount: "1000000", // 1 USDC (6 decimals)
64
63
  };
65
64
 
66
- const { anyspendQuote, isLoadingAnyspendQuote, getAnyspendQuoteError } =
67
- useAnyspendQuote(true, quoteRequest);
65
+ const { anyspendQuote, isLoadingAnyspendQuote, getAnyspendQuoteError } =
66
+ useAnyspendQuote(quoteRequest);
68
67
 
69
68
  if (isLoadingAnyspendQuote) return <div>Getting best price...</div>;
70
69
  if (getAnyspendQuoteError) return <div>Failed to get quote</div>;
@@ -138,7 +137,6 @@ function PaymentForm() {
138
137
 
139
138
  const handlePayment = () => {
140
139
  createOrder({
141
- isMainnet: true,
142
140
  recipientAddress: userWalletAddress,
143
141
  orderType: "swap",
144
142
  srcChain: 1,
@@ -164,8 +162,8 @@ function PaymentForm() {
164
162
  };
165
163
 
166
164
  return (
167
- <button
168
- onClick={handlePayment}
165
+ <button
166
+ onClick={handlePayment}
169
167
  disabled={isCreatingOrder}
170
168
  >
171
169
  {isCreatingOrder ? "Processing..." : "Pay with Crypto"}
@@ -187,14 +185,13 @@ const {
187
185
  orderAndTransactions,
188
186
  isLoadingOrderAndTransactions,
189
187
  getOrderAndTransactionsError
190
- } = useAnyspendOrderAndTransactions(isMainnet, orderId);
188
+ } = useAnyspendOrderAndTransactions(orderId);
191
189
  ```
192
190
 
193
191
  #### Parameters
194
192
 
195
193
  | Parameter | Type | Description |
196
194
  |-----------|------|-------------|
197
- | `isMainnet` | `boolean` | Environment selection |
198
195
  | `orderId` | `string` | Order ID to track |
199
196
 
200
197
  #### Return Values
@@ -223,8 +220,8 @@ interface OrderWithTransactions {
223
220
 
224
221
  ```tsx
225
222
  function OrderTracker({ orderId }: { orderId: string }) {
226
- const { orderAndTransactions, isLoadingOrderAndTransactions } =
227
- useAnyspendOrderAndTransactions(true, orderId);
223
+ const { orderAndTransactions, isLoadingOrderAndTransactions } =
224
+ useAnyspendOrderAndTransactions(orderId);
228
225
 
229
226
  if (isLoadingOrderAndTransactions) {
230
227
  return <div>Loading order status...</div>;
@@ -255,11 +252,11 @@ function OrderTracker({ orderId }: { orderId: string }) {
255
252
  <div className="order-status">
256
253
  <h2>Order #{orderId.slice(0, 8)}</h2>
257
254
  <p>{getStatusMessage(order.status)}</p>
258
-
255
+
259
256
  {depositTxs.length > 0 && (
260
257
  <div>
261
258
  <h3>Payment Transaction</h3>
262
- <a
259
+ <a
263
260
  href={`https://etherscan.io/tx/${depositTxs[0].txHash}`}
264
261
  target="_blank"
265
262
  rel="noopener noreferrer"
@@ -272,7 +269,7 @@ function OrderTracker({ orderId }: { orderId: string }) {
272
269
  {executeTx && (
273
270
  <div>
274
271
  <h3>Execution Transaction</h3>
275
- <a
272
+ <a
276
273
  href={`https://explorer.b3.fun/tx/${executeTx.txHash}`}
277
274
  target="_blank"
278
275
  rel="noopener noreferrer"
@@ -305,14 +302,13 @@ const {
305
302
  orderHistory,
306
303
  isLoadingOrderHistory,
307
304
  getOrderHistoryError
308
- } = useAnyspendOrderHistory(isMainnet, creatorAddress, limit, offset);
305
+ } = useAnyspendOrderHistory(creatorAddress, limit, offset);
309
306
  ```
310
307
 
311
308
  #### Parameters
312
309
 
313
310
  | Parameter | Type | Description |
314
311
  |-----------|------|-------------|
315
- | `isMainnet` | `boolean` | Environment selection |
316
312
  | `creatorAddress` | `string` | User wallet address |
317
313
  | `limit` | `number` | Number of orders to fetch (max 100) |
318
314
  | `offset` | `number` | Pagination offset |
@@ -325,7 +321,6 @@ function OrderHistory({ userAddress }: { userAddress: string }) {
325
321
  const pageSize = 10;
326
322
 
327
323
  const { orderHistory, isLoadingOrderHistory } = useAnyspendOrderHistory(
328
- true,
329
324
  userAddress,
330
325
  pageSize,
331
326
  page * pageSize
@@ -346,14 +341,14 @@ function OrderHistory({ userAddress }: { userAddress: string }) {
346
341
  <p>Date: {new Date(order.createdAt).toLocaleDateString()}</p>
347
342
  </div>
348
343
  ))}
349
-
350
- <button
351
- onClick={() => setPage(page - 1)}
344
+
345
+ <button
346
+ onClick={() => setPage(page - 1)}
352
347
  disabled={page === 0}
353
348
  >
354
349
  Previous
355
350
  </button>
356
- <button
351
+ <button
357
352
  onClick={() => setPage(page + 1)}
358
353
  disabled={!orderHistory?.data || orderHistory.data.length < pageSize}
359
354
  >
@@ -371,7 +366,7 @@ function OrderHistory({ userAddress }: { userAddress: string }) {
371
366
  Get available tokens for a specific chain.
372
367
 
373
368
  ```tsx
374
- const { tokens, isLoadingTokens } = useAnyspendTokens(true, 1, "USDC");
369
+ const { tokens, isLoadingTokens } = useAnyspendTokens(1, "USDC");
375
370
  ```
376
371
 
377
372
  ### `useCoinbaseOnrampOptions`
@@ -400,7 +395,7 @@ function PaymentComponent() {
400
395
  onError: (error) => {
401
396
  // Log error for debugging
402
397
  console.error("Payment failed:", error);
403
-
398
+
404
399
  // Show user-friendly message
405
400
  switch (error.message) {
406
401
  case "INSUFFICIENT_BALANCE":
@@ -423,7 +418,7 @@ function PaymentComponent() {
423
418
 
424
419
  ```tsx
425
420
  function SwapInterface() {
426
- const { anyspendQuote, isLoadingAnyspendQuote } = useAnyspendQuote(true, quoteRequest);
421
+ const { anyspendQuote, isLoadingAnyspendQuote } = useAnyspendQuote(quoteRequest);
427
422
  const { createOrder, isCreatingOrder } = useAnyspendCreateOrder();
428
423
 
429
424
  const isLoading = isLoadingAnyspendQuote || isCreatingOrder;
@@ -441,7 +436,7 @@ function SwapInterface() {
441
436
 
442
437
  ```tsx
443
438
  function OrderStatus({ orderId }: { orderId: string }) {
444
- const { orderAndTransactions } = useAnyspendOrderAndTransactions(true, orderId);
439
+ const { orderAndTransactions } = useAnyspendOrderAndTransactions(orderId);
445
440
 
446
441
  // Auto-refresh every 5 seconds for pending orders
447
442
  useEffect(() => {
@@ -449,7 +444,7 @@ function OrderStatus({ orderId }: { orderId: string }) {
449
444
  const interval = setInterval(() => {
450
445
  // Refetch is handled automatically by the hook
451
446
  }, 5000);
452
-
447
+
453
448
  return () => clearInterval(interval);
454
449
  }
455
450
  }, [orderAndTransactions?.data.order.status]);
@@ -462,4 +457,4 @@ function OrderStatus({ orderId }: { orderId: string }) {
462
457
 
463
458
  - [See Examples →](./examples.md)
464
459
  - [Error Handling →](./error-handling.md)
465
- - [Components Reference →](./components.md)
460
+ - [Components Reference →](./components.md)