input-output-hk / marlowe-playground

Apache License 2.0
6 stars 7 forks source link

PLT-7305 - Improve error message on invalid addresses #59

Closed palas closed 9 months ago

palas commented 9 months ago

This PR:

In order to achieve this, the PR also implements the address validation algorithm in PureScript, with the following caveats:

I am tagging @bwbush for expertise on CIP19, and @hrajchert for expertise in PureScript and the Playground.

It would be good to double check the way I am validating the padding of the bech32, I am not 100% confident it is correct.

If you merge the PR, please squash it, because some of the intermediate commits are broken.

Pre-submit checklist:

palas commented 9 months ago

There's another test that could be done during linting: checking that the contract isn't mixing mainnet and testnet addresses, since there would be no network where the contract could run correctly. (In fact, we might want to have the "send to Runner" check that the contract has addresses that are consistent with the network.)

Good idea, I made a ticket: PLT-8828