|
|
|
@ -21,6 +21,10 @@ export class Web3ProviderModule extends Plugin { |
|
|
|
|
Should be taken carefully and probably not be release as it is now. |
|
|
|
|
*/ |
|
|
|
|
sendAsync (payload) { |
|
|
|
|
console.log(payload) |
|
|
|
|
return this.askUserPermission('sendAsync', `Calling ${payload.method} with parameters ${JSON.stringify(payload.params)}`).then( |
|
|
|
|
async (result) => { |
|
|
|
|
if(result){ |
|
|
|
|
return new Promise((resolve, reject) => { |
|
|
|
|
const provider = this.blockchain.web3().currentProvider |
|
|
|
|
// see https://github.com/ethereum/web3.js/pull/1018/files#diff-d25786686c1053b786cc2626dc6e048675050593c0ebaafbf0814e1996f22022R129
|
|
|
|
@ -42,6 +46,14 @@ export class Web3ProviderModule extends Plugin { |
|
|
|
|
resolve(message) |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
}else{ |
|
|
|
|
return new Promise((resolve, reject) => { |
|
|
|
|
reject(new Error('User denied permission')) |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
async tryTillReceiptAvailable (txhash) { |
|
|
|
|