Skip to content

Commit

Permalink
Merge pull request #642 from eco-stake/improve-leap-error
Browse files Browse the repository at this point in the history
Improve leap not supported error
  • Loading branch information
tombeynon authored Oct 13, 2022
2 parents c4561eb + a52e9b8 commit e039f97
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/utils/LeapSignerProvider.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default class LeapSignerProvider extends SignerProvider {
key = 'leap'
label = 'Leap Wallet'
keychangeEvent = 'leap_keystorechange'
suggestChainSupport = false
suggestChainSupport = true

enable(network){
if (network.gasPricePrefer) {
Expand All @@ -15,6 +15,10 @@ export default class LeapSignerProvider extends SignerProvider {
return super.enable(network)
}

suggestChain(network){
throw new Error(`${network.prettyName} (${network.chainId}) is not supported`)
}

setOptions(options){
return this.provider.defaultOptions = options
}
Expand Down

0 comments on commit e039f97

Please sign in to comment.