chain-jslib icon indicating copy to clipboard operation
chain-jslib copied to clipboard

Problem: Change string to Address type

Open cdc-Hitesh opened this issue 4 years ago • 2 comments

This issue is for a different type of addresses we handle in our SDK. Will it be a better idea to:

  1. Add address type validation in owTypes.
  2. Create a custom Address type instead of directly using string which kind of mitigates user address input level issues

What's your thoughts?

cdc-Hitesh avatar Dec 13 '20 20:12 cdc-Hitesh

Not sure I understand this ticket well,

  • Which problem is it trying to solve?
  • What's the suggested approach?

crypto-eddy avatar Dec 13 '20 20:12 crypto-eddy

Thanks @eddycpc

Which problem is it trying to solve?

It's less of a problem and more of an enhancement. It's basically mitigating the address format and length level issues which I think we can take care of at an earlier stage.

What's the suggested approach?

  • Create a custom address type class Address which when instantiated like new Address() can be referenced.

cdc-Hitesh avatar Dec 14 '20 09:12 cdc-Hitesh