mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
[MMI] Set approved status in tx controller in MMI logic (#20507)
* fix(custodial-signing): set approved status in tx controller in MMI logic * Fixed the issue that was not showing custody-confirm-link --------- Co-authored-by: Shane Terence Odlum <shane.odlum@consensys.net>
This commit is contained in:
parent
8807d06535
commit
60f149178c
@ -1779,7 +1779,11 @@ export default class TransactionController extends EventEmitter {
|
|||||||
// MMI does not broadcast transactions, as that is the responsibility of the custodian
|
// MMI does not broadcast transactions, as that is the responsibility of the custodian
|
||||||
if (txMeta.custodyStatus) {
|
if (txMeta.custodyStatus) {
|
||||||
this.inProcessOfSigning.delete(txId);
|
this.inProcessOfSigning.delete(txId);
|
||||||
|
// Custodial nonces and gas params are set by the custodian, so MMI follows the approve
|
||||||
|
// workflow before the transaction parameters are sent to the keyring
|
||||||
|
this.txStateManager.setTxStatusApproved(txId);
|
||||||
await this._signTransaction(txId);
|
await this._signTransaction(txId);
|
||||||
|
// MMI relies on custodian to publish transactions so exits this code path early
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
///: END:ONLY_INCLUDE_IN
|
///: END:ONLY_INCLUDE_IN
|
||||||
|
@ -746,9 +746,6 @@ export default class ConfirmTransactionBase extends Component {
|
|||||||
|
|
||||||
sendTransaction(txData)
|
sendTransaction(txData)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
if (!this._isMounted) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (txData.custodyStatus) {
|
if (txData.custodyStatus) {
|
||||||
showCustodianDeepLink({
|
showCustodianDeepLink({
|
||||||
fromAddress,
|
fromAddress,
|
||||||
@ -762,6 +759,9 @@ export default class ConfirmTransactionBase extends Component {
|
|||||||
},
|
},
|
||||||
onDeepLinkShown: () => {
|
onDeepLinkShown: () => {
|
||||||
clearConfirmTransaction();
|
clearConfirmTransaction();
|
||||||
|
if (!this._isMounted) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.setState({ submitting: false }, () => {
|
this.setState({ submitting: false }, () => {
|
||||||
history.push(mostRecentOverviewPage);
|
history.push(mostRecentOverviewPage);
|
||||||
updateCustomNonce('');
|
updateCustomNonce('');
|
||||||
@ -769,6 +769,9 @@ export default class ConfirmTransactionBase extends Component {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
if (!this._isMounted) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.setState(
|
this.setState(
|
||||||
{
|
{
|
||||||
submitting: false,
|
submitting: false,
|
||||||
|
Loading…
Reference in New Issue
Block a user