You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 12, 2023. It is now read-only.
The coin type determination should be achieved using object-oriented method as other property, instead of using a separate configuration array variable.
The config file should store the category for each "coin", specifically whether it is a native currency of the crypto network (e.g. R-BTC on RSK), or if it is a token (e.g. RIF on RSK`).
Once that is done, instead of deciding how to construct the transaction based on a hard coded value, can use this category value to decide instead. The intent behind this is:
forward looking, e.g. when we add more categories of tokens
less likelihood of regression, since things are configured in a single place
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
From Brendan,
The coin type determination should be achieved using object-oriented method as other property, instead of using a separate configuration array variable.
Example 1:
955c072#diff-91fb241661b3998d5c42b6029dd03123R45-R49
if (symbol === 'RBTC') {
rawTransaction.to = to;
rawTransaction.data = memo;
} else {
const assetContract = ASSETS_CONTRACT[symbol][type];
if (symbol === 'RBTC')
should be implemented in coin.createRawTransaction(to, memo) since each coin has the property symbol.Example 2,
in src/pages/wallet/wallet.connect/index.js line 235,
all lines with _.filter() should be replaced by the actual logic such as
coin.getPrivateKey()
The text was updated successfully, but these errors were encountered: