DePayFi / widgets

💸 Payments directly into your wallet. DePay simplifies and improves Web3 Payments with the power of DeFi. Accept any token with on-the-fly conversion and state-of-the-art widgets.
https://depay.com
MIT License
96 stars 36 forks source link

fix autoslippage and bsc rpc limits #68

Closed 10xSebastian closed 1 year ago

10xSebastian commented 1 year ago

Updates dependencies to improve auto-slippage and to fix RPC batch limits.

Migration Guide

Step 1: install @depay/solana-web3.js to build widgets

Even if you are not using solana. Platform-specific build capabilities will be provided later (like EVM etc.)

yarn add @depay/solana-web3.js

Step 2: rename confirmed callbacks to succeeded

confirmed callbacks have been renamed to succeeded to prevent confusion, as a failed transaction is technically confirmed by the network as "failed" and only succeeded indicates that a transaction has been: confirmed and succeeded.

Change:

confirmed: (transaction)=>

to

succeeded: (transaction)=>

Step 3: DePayWidgets.Connect only returns account

DePayWidgets.Connect stops returning accounts, and only returns the currently selected account

let { account, wallet }  = await DePayWidgets.Connect()