Skip to content

Commit

Permalink
Merge pull request #643 from eco-stake/disable-evmos-ledger
Browse files Browse the repository at this point in the history
Disable Evmos ledger support
  • Loading branch information
tombeynon authored Oct 13, 2022
2 parents e039f97 + 1e20ec8 commit 314d865
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/networks.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@
"name": "evmos",
"txTimeout": 120000,
"ownerAddress": "evmosvaloper1umk407eed7af6anvut6llg2zevnf0dn0feqqny",
"maxPerDay": 1
"maxPerDay": 1,
"ledgerSupport": false
},
{
"name": "sifchain",
Expand Down
1 change: 1 addition & 0 deletions src/utils/Network.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ class Network {
this.coinGeckoId = this.chain.coinGeckoId
this.estimatedApr = this.chain.estimatedApr
this.apyEnabled = data.apyEnabled !== false && !!this.estimatedApr && this.estimatedApr > 0
this.ledgerSupport = this.chain.ledgerSupport ?? true
this.authzSupport = this.chain.authzSupport
this.authzAminoSupport = this.chain.authzAminoSupport
this.defaultGasPrice = this.decimals && format(bignumber(multiply(0.000000025, pow(10, this.decimals))), { notation: 'fixed', precision: 4}) + this.denom
Expand Down
8 changes: 6 additions & 2 deletions src/utils/SignerProvider.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,13 @@ export default class SignerProvider {
return this.provider.enable(chainId)
}

getKey(network){
async getKey(network){
const { chainId } = network
return this.provider.getKey(chainId)
const key = await this.provider.getKey(chainId)
if(!network.ledgerSupport && (key.isNanoLedger || key.isHardware)){
throw new Error('Ledger support is coming soon')
}
return key
}

getSigner(network){
Expand Down

0 comments on commit 314d865

Please sign in to comment.