mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
fix tx data so it has the network id
This commit is contained in:
parent
f665b779cb
commit
17aac2dbc5
@ -38,7 +38,7 @@ module.exports = class KeyringController extends EventEmitter {
|
|||||||
this._unconfTxCbs = {}
|
this._unconfTxCbs = {}
|
||||||
this._unconfMsgCbs = {}
|
this._unconfMsgCbs = {}
|
||||||
|
|
||||||
this.network = opts.network
|
this.getNetwork = opts.getNetwork
|
||||||
|
|
||||||
// TEMPORARY UNTIL FULL DEPRECATION:
|
// TEMPORARY UNTIL FULL DEPRECATION:
|
||||||
this.idStoreMigrator = new IdStoreMigrator({
|
this.idStoreMigrator = new IdStoreMigrator({
|
||||||
@ -344,13 +344,14 @@ module.exports = class KeyringController extends EventEmitter {
|
|||||||
var time = (new Date()).getTime()
|
var time = (new Date()).getTime()
|
||||||
var txId = createId()
|
var txId = createId()
|
||||||
txParams.metamaskId = txId
|
txParams.metamaskId = txId
|
||||||
txParams.metamaskNetworkId = this.network
|
txParams.metamaskNetworkId = this.getNetwork()
|
||||||
var txData = {
|
var txData = {
|
||||||
id: txId,
|
id: txId,
|
||||||
txParams: txParams,
|
txParams: txParams,
|
||||||
time: time,
|
time: time,
|
||||||
status: 'unconfirmed',
|
status: 'unconfirmed',
|
||||||
gasMultiplier: configManager.getGasMultiplier() || 1,
|
gasMultiplier: configManager.getGasMultiplier() || 1,
|
||||||
|
metamaskNetworkId: this.getNetwork(),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -17,6 +17,7 @@ module.exports = class MetamaskController {
|
|||||||
this.configManager = new ConfigManager(opts)
|
this.configManager = new ConfigManager(opts)
|
||||||
this.keyringController = new KeyringController({
|
this.keyringController = new KeyringController({
|
||||||
configManager: this.configManager,
|
configManager: this.configManager,
|
||||||
|
getNetwork: this.getStateNetwork.bind(this),
|
||||||
})
|
})
|
||||||
this.provider = this.initializeProvider(opts)
|
this.provider = this.initializeProvider(opts)
|
||||||
this.ethStore = new EthStore(this.provider)
|
this.ethStore = new EthStore(this.provider)
|
||||||
@ -399,4 +400,9 @@ module.exports = class MetamaskController {
|
|||||||
cb(e)
|
cb(e)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getStateNetwork () {
|
||||||
|
return this.state.network
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user