mirror of
https://github.com/status-im/snt-gas-relay.git
synced 2025-02-05 11:03:50 +00:00
Added option to get token by symbol
This commit is contained in:
parent
1b261d29f9
commit
26313bf241
@ -34,6 +34,16 @@ class ContractSettings {
|
||||
return this.tokens[token];
|
||||
}
|
||||
|
||||
getTokenBySymbol(symbol){
|
||||
for(let token in this.tokens){
|
||||
if(this.tokens[token].symbol == symbol){
|
||||
const tokenObj = this.tokens[token];
|
||||
tokenObj.address = token;
|
||||
return tokenObj;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
getContractByTopic(topicName){
|
||||
return this.contracts[topicName];
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user