Use a dummy address for the read-only signer
Necessary for ethers not to fail with public RSK nodes
This commit is contained in:
parent
a1a68092f6
commit
6e0ec8741e
|
@ -69,7 +69,10 @@ class Kredits {
|
|||
if (wallet) {
|
||||
signer = wallet.connect(ethProvider);
|
||||
} else if (ethProvider.getSigner) {
|
||||
signer = ethProvider.getSigner();
|
||||
// Only useful for reading data, not writing. The (unused) address is
|
||||
// necessary because without an address, ethers.js will try to look up
|
||||
// the provider's account 0, which doesn't work on our public RSK nodes.
|
||||
signer = ethProvider.getSigner('0xfa77675540E550b911a6AABF3805ac17C6641ec1');
|
||||
}
|
||||
return new Kredits(ethProvider, signer, kreditsOptions);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue