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

V9 #74

Closed 10xSebastian closed 1 year ago

10xSebastian commented 1 year ago

Breaking Changes

  1. Switches data types for nonce and after_block to string (previously integers)
  2. Introduces case-sensitivity for all kinds of addresses (receiver, sender, tokens etc.)
  3. Drops event configuration
  4. Introduces pre-track, which submits a payment object (without transaction id) before wallet signs the transaction to ensure there is a trace of the payment even before it was submitted to the blockchain.

Pretracking details

Pre-tracking happens only if you have enabled payment tracking/validation. It uses the same method/endpoint as tracking payments, it will just not contain the transaction_id.

Make sure that you forward the pre-tracking payment object just as you are used to doing with the payment object, except it does not contain a transaction_id.

Continue to forward payments upon tracking (post submission) just as before they will merged within DePay APIs.

Other changes

  1. improves validation speed for payments happening in internal transactions e.g. ETH through a smart contract.
  2. introduces ETA countdown for payment validations with confirmations > 1
  3. Introduces payment routes that just require unwrapping, and wrapping, like ETH<>WETH etc.

Migration Guide

  1. Make sure you integrate pre-track (a tracking request prior to signing the transaction without a transaction_id) and forward the pre-track to DePay APIs for payment validation.
  2. Make sure you handle addresses (sender, receiver, token etc.) as given (case sensitive).
  3. Make sure you handle after_block and nonce as data type string (not an integer anymore).
  4. If you relied on on-chain events via event configuration, you need to switch to other event emitters/solutions