Skip to content

Commit

Permalink
chore
Browse files Browse the repository at this point in the history
  • Loading branch information
LuizAsFight committed Dec 26, 2024
1 parent f73483e commit 6dd7ee7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
7 changes: 7 additions & 0 deletions packages/app/src/systems/Network/services/networkProviders.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@ export class NetworkProviders {
}
}
}

async getProvider(url: string) {
if (!this.providers[url]) {
await this.populateProviders();
}
return this.providers[url];
}
}

export const networkProviders = new NetworkProviders();
5 changes: 2 additions & 3 deletions packages/app/src/systems/Vault/services/VaultServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,10 +161,9 @@ export class VaultServer extends EventEmitter {
}: VaultInputs['signTransaction']): Promise<string> {
const wallet = await this.manager.getWallet(Address.fromString(address));
const transactionRequest = transactionRequestify(JSON.parse(transaction));
// debugger;
const provider = await networkProviders.providers[providerUrl];
const provider = await networkProviders.getProvider(providerUrl);
console.log('asd networkProviders', networkProviders);
console.log('asd provider', provider);
// debugger;
wallet.connect(provider);
const signature = await wallet.signTransaction(transactionRequest);
return signature;
Expand Down

0 comments on commit 6dd7ee7

Please sign in to comment.