requestNetwork
requestNetwork copied to clipboard
feat: improve currency typing
This change allows 2 things:
- using more specific types, like
ERC20Currency:
const method = (c: ERC20Currency) => c;
if (curr.type === 'ERC20') {
method(curr);
}
- simplify the use of
network:
if(curr.type === 'ISO4217'){
// type: undefined
curr.network
} else{
// type: string
curr.network
}