perun-network / erdstall-ts-sdk

TypeScript client SDK to interact with Erdstall.
Apache License 2.0
5 stars 2 forks source link

Return more specific transaction names in `deposit` calls #124

Closed sebastianst closed 1 month ago

sebastianst commented 2 years ago

@ndzik explained to me that it's about differentiating the different calls during deposits. Wouldn't it then actually make sense to replace StageName by just a string and then write something more specific into it, like erc721/${tokenAddr}/{id}/approve or erc20/${tokenAddr}/approve etc? Because if deposit is called on multiple assets, only knowing that it's an approval or deposit call is ambiguous. Anyway, we can think about this in a later issue.

_Originally posted by @sebastianst in https://github.com/perun-network/erdstall-ts-sdk/pull/119#discussion_r752150872_

ndzik commented 2 years ago

Having just a string allowing for detailed explanations of each stage might even be better. We opted for the simple approach on the beginning because more was not necessary.

Thinking back at how we would like to display information on the stages in NERD though makes strings better.

sebastianst commented 2 years ago

Related, I thought about adding an optional argument displayProgress?: function(message string, fractionDone number) to functions that perform complex multi-stage operations. A frontend component could then inject such a progress displayer when calling, e.g., leave.

RmbRT commented 1 month ago

Part of #158.