Comments (8)
Yup, to confirm the findings above, I modified my local copy to remove deep clone:
// const transactionMetaWithRsv = _lodash.cloneDeep.call(void 0, transactionMeta);
const transactionMetaWithRsv = transactionMeta;
With the above RSV is persisted. Let me know if you would like me to prepare a PR, but it should be pretty straightforward.
from metamask-extension.
@dbrans Great work! I have included v29.0.1 into my local metamask-extension (v11.15.5), tested it and I can confirm that the rsv is now back.
from metamask-extension.
I can confirm the regression was introduced in v11.14.0, last working version was v11.13.3.
from metamask-extension.
Just digging into this a bit more, it looks like there was a major refactor from v11.13.3 to v11.14.0. At a glance, it doesn't look like the regression was introduced in metamask-extension, but perhaps further upstream.
I can see @metamask/transaction-controller was updated from v23.1.0 to v27.0.1, and there were also quite big changes between these versions. One thing which stood out was:
private async updateTransactionMetaRSV(
transactionMeta: TransactionMeta,
signedTx: TypedTransaction,
): Promise<TransactionMeta> {
const transactionMetaWithRsv = cloneDeep(transactionMeta);
...
The old version did not do a deep clone before setting the RSV, but new version above does. Maybe the TransactionMeta without the RSV is being returned from the API instead of the updated one?
Any guidance on this would be appreciated.
from metamask-extension.
Ok, I have tracked it down.
In transaction-controller.ts signTransaction(), it does update state transaction with rsv:
this.updateTransaction(
transactionMetaWithRsv,
'TransactionController#approveTransaction - Transaction signed',
);
However, upon returning to the caller approveTransaction(), it replaces the transaction with an older one without the rsv:
this.updateTransaction(
updatedTransactionMeta,
'TransactionController#approveTransaction - Transaction submitted',
);
There is a discontinuity between updatedTransactionMeta and transactionMetaWithRsv. In the previous version deep clone was not used, so the properties got shallow copied and persisted.
A few options, we can either not do a deep copy, or make signTransaction() return an updated meta that the caller will merge with updatedTransactionMeta.
from metamask-extension.
Just following up to see if there is progress on this bug? I am happy to submit the one-liner PR above to revert the regression if this will help speed things up. This change is causing some dapps to break as they are currently using RSV to verify that the txn has been signed after sending.
from metamask-extension.
Just looking at the metamask-core issues, and it looks like this is fixed here:
I will test it once metamask-extension upgrades transaction-controller to the version >= 29.0.1
from metamask-extension.
@keithchew great catch and good job tracking this down. I'm adding this bug as fixed by #24701. If you have a moment, could you take a look at the builds on that PR to ensure the bug is fixed?
from metamask-extension.
Related Issues (20)
- [Bug]: Cannot destructure property 'chainId' HOT 3
- Support various redesign signatures in ConfirmPage Storybook
- North Star metrics for Flaky tests: Update zapier scripts
- Full-screen home screens
- Convert MetaMetricsController tests from mocha to jest
- [Bug]: Cannot get the latest value after switching the network HOT 14
- [Bug]: Send and swap flow for unsupported networks HOT 1
- [Bug]: Sentry source maps broken for certain files HOT 2
- TypeError: Cannot read properties of undefined (reading 'hasDocument') HOT 1
- TypeError: Cannot read properties of undefined (reading 'selectedAccount')
- Error: Only a single offscreen document may be created. HOT 1
- TypeError: Error in invocation of alarms.create(optional string name, alarms.AlarmCreateInfo alarmInfo, opti... HOT 1
- [Bug]: On the token details screen, the amount displayed is not rounded and may not be fully visible HOT 1
- [Bug]: No warning shown when the account doesn't have sufficient balance' for gas fees, pop-up notification wording should be modified HOT 1
- [Bug]: Unable to submit a transaction on BNB Chain HOT 1
- Signature Redesign: Update the Permit "Approve To" value to read parsed third-party details
- AbortError: Failed to execute 'showSaveFilePicker' on 'Window': Intercepted by Page.setInterceptFileChooserDi... HOT 1
- bug: Update AvararIcon icon sizes
- [Bug]: For imported accounts, tokens are not immediately recognized until there is a network switch or the extension is reloaded
- [Bug]: Inconsistency in the behavior between native and non-native tokens during the process of switching tokens
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from metamask-extension.