Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
80778b365e |
@@ -64,7 +64,9 @@ class DydxChainTransactions implements AbacusDYDXChainTransactionsProtocol {
|
|||||||
|
|
||||||
setNobleWallet(nobleWallet: LocalWallet) {
|
setNobleWallet(nobleWallet: LocalWallet) {
|
||||||
this.nobleWallet = nobleWallet;
|
this.nobleWallet = nobleWallet;
|
||||||
this.nobleClient?.connect(nobleWallet);
|
if (this.nobleClient) {
|
||||||
|
this.nobleClient.connect(nobleWallet);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async connectNetwork(
|
async connectNetwork(
|
||||||
@@ -109,8 +111,11 @@ class DydxChainTransactions implements AbacusDYDXChainTransactionsProtocol {
|
|||||||
);
|
);
|
||||||
|
|
||||||
this.compositeClient = compositeClient;
|
this.compositeClient = compositeClient;
|
||||||
|
|
||||||
|
if (nobleValidatorUrl) {
|
||||||
this.nobleClient = new NobleClient(nobleValidatorUrl);
|
this.nobleClient = new NobleClient(nobleValidatorUrl);
|
||||||
if (this.nobleWallet) await this.nobleClient.connect(this.nobleWallet);
|
if (this.nobleWallet) await this.nobleClient.connect(this.nobleWallet);
|
||||||
|
}
|
||||||
// Dispatch custom event to notify other parts of the app that the network has been connected
|
// Dispatch custom event to notify other parts of the app that the network has been connected
|
||||||
const customEvent = new CustomEvent('abacus:connectNetwork', {
|
const customEvent = new CustomEvent('abacus:connectNetwork', {
|
||||||
detail: parsedParams,
|
detail: parsedParams,
|
||||||
|
|||||||
Reference in New Issue
Block a user