Plutonomicon / cardano-transaction-lib

A Purescript library for building smart contract transactions on Cardano
https://plutonomicon.github.io/cardano-transaction-lib/
MIT License
92 stars 50 forks source link

getCollateral may return null #1560

Closed klntsky closed 9 months ago

klntsky commented 9 months ago

According to CIP-30:

api.getCollateral(params: { amount: cbor\<Coin> }): Promise\<TransactionUnspentOutput[] | null>

We don't handle null properly.

klntsky commented 9 months ago

https://github.com/Plutonomicon/cardano-transaction-lib/blob/199f6debd3ff339b8598ef3cc772c0491ee715ce/src/Internal/Wallet/Cip30.js#L13