-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: base token attributes #375
fix: base token attributes #375
Conversation
API E2E Test Results207 tests 207 ✅ 19s ⏱️ Results for commit 0273d84. ♻️ This comment has been updated with latest results. |
Unit Test Results 4 files 264 suites 11m 51s ⏱️ Results for commit 0273d84. ♻️ This comment has been updated with latest results. |
Visit the preview URL for this PR: |
@@ -103,7 +106,21 @@ export class TransactionProcessor { | |||
}); | |||
await Promise.all( | |||
transactionData.tokens.map((token) => { | |||
return this.tokenRepository.upsert(token); | |||
if (token.l2Address.toLowerCase() === utils.L2_BASE_TOKEN_ADDRESS.toLowerCase()) { | |||
this.tokenRepository.upsert({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please extend tests to cover this overwrite logic in the transaction.processor.spec
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@petarTxFusion this comment is still to be resolved.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missed this comment, its resolved now.
e8d80ae
to
0bda7fd
Compare
) { | ||
this.logger = new Logger(TransactionProcessor.name); | ||
console.log("Batch processing polling interval", configService); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this log statement was used for testing and should be removed.
@@ -101,9 +120,24 @@ export class TransactionProcessor { | |||
blockNumber: blockNumber, | |||
transactionHash: transactionData.transaction.hash, | |||
}); | |||
console.log("Config l1 transaction processor", this.baseTokenConfig.l1Address); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto
await Promise.all( | ||
transactionData.tokens.map((token) => { | ||
return this.tokenRepository.upsert(token); | ||
if (token.l2Address.toLowerCase() === utils.L2_BASE_TOKEN_ADDRESS.toLowerCase()) { | ||
this.tokenRepository.upsert({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The return
statement is missing for this.tokenRepository.upsert
so the Promise won't be returned from the map
function and, as a result, the execution won't be properly awaited by Promise.all
.
iconURL: this.baseTokenConfig.iconUrl, | ||
}); | ||
} else { | ||
this.tokenRepository.upsert(token); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto.
3c4e152
to
0273d84
Compare
🎉 This PR is included in version 2.61.1 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
What ❔
Import base token attributes from config
Why ❔
For custom chains base token attributes are read from contract which is incorrect. Contract always contains
Ether
attributesChecklist
This PR fixes: #335
[+] PR title corresponds to the body of PR (we generate changelog entries from PRs).
[+] Tests for the changes have been added / updated.
Documentation comments have been added / updated.