-
Notifications
You must be signed in to change notification settings - Fork 98
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
Ana/send claim rewards amount to extension #3736
Conversation
Another possibility would be, instead of adding amount as the last message in the signMessage for extension, to add it in every message together with validators, like this: (lines 103-109)
But there is not much difference and I think it is better to add it as the last one |
Codecov Report
@@ Coverage Diff @@
## develop #3736 +/- ##
===========================================
+ Coverage 86.88% 87.08% +0.19%
===========================================
Files 125 125
Lines 2669 2671 +2
Branches 395 396 +1
===========================================
+ Hits 2319 2326 +7
+ Misses 330 325 -5
Partials 20 20
|
It is actually working quite well |
type: "/".concat(type), | ||
value: { amount: transactionProperties.amounts } | ||
} | ||
txMessages.push(claimAmountMessage) |
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.
lol I get it now. very hacky... ^^
you remember that it is a bad idea to mix data types. same goes for adding pseudo messages to an actual message array.
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.
Proposal:
extend getSigner
in signer.js
to return functions of the format (signMessage, metaData) => ...
where metaData = { claimableRewards }
then pass metaData
to signWithExtension
and send it to the extension. The extension now reads this prop and uses it to display this information.
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.
OK, so then I don't throw this into the messages... it feels weird to call this a metaData though. Especially when there is already a txMetaData
already dancing around in ActionManager (can lead to confusion)
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.
yeah this whole thing needs to be heavily refactored. you can call it anything else. how about displayingData
.
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.
Well, I will added it right there then. To txMetadata
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.
What about #3736 (comment)?
EDIT: doesn't work either
Looks better! Why are e2e failing? |
Some problem with fetching from browserstack EDIT: Let's merge 💃 ! |
submitType, | ||
password, | ||
displayedProperties | ||
} = txMetaData |
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.
😉
Co-Authored-By: Jordan Bibla <[email protected]>
displayedProperties: | ||
this.title === "Claim Rewards" ? properties.amounts : null | ||
} |
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.
displayedProperties: | |
this.title === "Claim Rewards" ? properties.amounts : null | |
} | |
displayedProperties: { | |
amounts: properties.amounts | |
} | |
} |
…github.com/luniehq/lunie into ana/send-claim-rewards-amount-to-extension
Give me a bit and I also implement this |
@@ -60,8 +60,15 @@ export default { | |||
computed: { | |||
...mapGetters([`address`, `network`, `stakingDenom`]), | |||
transactionData() { | |||
if (!this.claimedReward) return {} |
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.
what is this for? will this break if claimedReward
is not there?
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 just copied from the other components 🤷♀
Yes, it would break but it would in any case. I can just get rid of it
By the way, we should merge this now that luniehq/lunie-browser-extension#179 is in, since otherwise it will break sowieso with the first claim rewards transaction
* changelog * preload network capabilities * tests fixed * add slug to store and mutations * lunie version changed * Aleksei/fixing path on extension (#173) * changelog * fixing redirect path after account creation in extension * refactor isExtension getter using lunie config Co-authored-by: Bitcoinera <[email protected]> * correct submodule version * added missing webpack resolution * force checkout * change to working commit * make updates async * remove package lock again * use working commit * first steps to parsing to v2 txs * clone parsing from API * linted * move parsetx to store * delete consolelog * fix tests * fix actions tests * lint * just in case add ledger_app like in fe * working with #3736 in fe * stay clean * fix validators names in claim rewards * fix tests * lint * working with #3736 now for real * add claimable rewards * lint. kill now unused functions * changelog * refactor property names * linted Co-authored-by: Aleksei Rudometov <[email protected]> Co-authored-by: Bitcoinera <[email protected]>
Closes #ISSUE
Description:
The TransactionData being returned from ModalWithdrawRewards was incomplete and the getter for stakingDenom there was broken too.
Includes a hack I'll need to refactor to include a last message in Claim rewards with the amount (for extension).
This is a work in progress.
Thank you! 🚀
For contributor:
yarn changelog
for a guided process.Files changed
in the github PR explorerFor reviewer: