anza-xyz / solana-pay

A new standard for decentralized payments.
https://solanapay.com
Apache License 2.0
1.28k stars 447 forks source link

feat(validateTransfer): optional amount field & overloading of `validateTransfer` that returns amount #231

Open melonges opened 4 months ago

melonges commented 4 months ago
  1. According to the specification amount is optional so validation of payment for an unknown amount will be useful.

  2. However, wants to know the amount of transfer. In our case to avoid repeating actions that already happen in validateTransfer has been created the overload that returns tuple where the second part will be amount.