stacks-blockchain-api icon indicating copy to clipboard operation
stacks-blockchain-api copied to clipboard

Subnet: Get pending withdrawal (STX, FT, NFTs) for address

Open hugoclrd opened this issue 2 years ago • 2 comments

The withdrawal of assets from L2 happen in two steps: call stx-withdraw? on L2 and then call withdraw-stx on L1 (function names might change).

At any point, we should be able to retrieve pending withdrawals. It can be done by fetching withdraw transactions . But more logic is needed to fetch all transactions and filter out already completed withdrawals.

Should this logic be implemented at the API level?

hugoclrd avatar Mar 24 '23 17:03 hugoclrd

Current implementation on the demo app: https://github.com/hirosystems/subnets-nft-demo/blob/main/src/stacks/apiCalls.ts#L175-L254

hugoclrd avatar Apr 25 '23 12:04 hugoclrd

We can revisit this depending on the Subnet reception and the feedback or perceived expensiveness.

sabbyanandan avatar Jul 31 '23 16:07 sabbyanandan