Skip to content

Commit d9fefd2

Browse files
committed
update getSigner
1 parent 66e5c74 commit d9fefd2

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

apps/remix-dapp/src/utils/txRunner.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ export class TxRunner {
233233

234234
let currentDateTime = new Date();
235235
try {
236-
const signer = await (provider as BrowserProvider).getSigner();
236+
const signer = await (provider as BrowserProvider).getSigner(tx.from || 0);
237237
const { hash } = await signer.sendTransaction(tx);
238238
const receipt = await tryTillReceiptAvailable(hash);
239239
tx = await tryTillTxAvailable(hash);

apps/remix-ide/src/app/plugins/solidity-script.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ export class SolidityScript extends Plugin {
7575
}
7676
const bytecode = '0x' + contract.object.evm.bytecode.object
7777
const web3 = await this.call('blockchain', 'web3')
78-
const signer = await web3.getSigner()
7978
const accounts = await this.call('blockchain', 'getAccounts')
8079
if (!accounts || accounts.length === 0) {
8180
throw new Error('no account available')
@@ -88,6 +87,7 @@ export class SolidityScript extends Plugin {
8887
}
8988
let receipt
9089
try {
90+
const signer = await web3.getSigner(tx.from || 0)
9191
const { hash } = await signer.sendTransaction(tx)
9292
receipt = await web3.getTransactionReceipt(hash)
9393
} catch (e) {

libs/remix-lib/src/execution/txRunnerWeb3.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ export class TxRunnerWeb3 {
9696
promptCb(
9797
async (value) => {
9898
try {
99-
const res = await (await this.getWeb3().getSigner()).sendTransaction({ ...tx, value })
99+
const res = await (await this.getWeb3().getSigner(tx.from || 0)).sendTransaction({ ...tx, value })
100100
cb(null, res.hash, isCreation, false, null)
101101

102102
} catch (e) {

0 commit comments

Comments
 (0)