Skip to content
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

feat: add NanoContractTransaction screen [12] #440

Merged
merged 15 commits into from
Jun 14, 2024

Conversation

alexruzenhack
Copy link
Contributor

@alexruzenhack alexruzenhack commented Mar 12, 2024

Acceptance Criteria

  • It should add NanoContractTransaction screen

  • It should add a NanoContractTransactionHeader component

  • It should improve FeedbackContent component by adding a wrapper layer with overflow scroll

  • It should add icon Received.icon component

  • It should add icon Sent.icon component

  • It should improve TextValue by adding title option

  • It should add NanoContractTransactionActionList component

  • It should add NanoContractTransactionActionListItem component

Warning

The action components are not being used because it requires new methods at wallet-lib that are not yet implemented.

Warning

I already changed the screen title, despite the recording and screenshots is steel showing the old title.

Nano Contract Transaction Screen showing a bet transaction

nc-transaction-recording.mp4

Nano Contract Transaction header expaned

Security Checklist

  • Make sure you do not include new dependencies in the project unless strictly necessary and do not include dev-dependencies as production ones. More dependencies increase the possibility of one of them being hijacked and affecting us.

@alexruzenhack alexruzenhack self-assigned this Mar 12, 2024
@alexruzenhack alexruzenhack force-pushed the feat/nano-contract-transactions-component branch 2 times, most recently from 1e13c7d to 593332c Compare April 1, 2024 16:02
@alexruzenhack alexruzenhack force-pushed the feat/nano-contract-transaction-details-component branch 2 times, most recently from 6a6e1e7 to a0caced Compare April 1, 2024 18:16
@alexruzenhack alexruzenhack changed the title feat: add NanoContractTransaction screen feat: add NanoContractTransaction screen [12] Apr 8, 2024
@alexruzenhack alexruzenhack force-pushed the feat/nano-contract-transactions-component branch from 593332c to d0fd277 Compare May 14, 2024 15:16
@alexruzenhack alexruzenhack force-pushed the feat/nano-contract-transaction-details-component branch from a0caced to f823c2b Compare May 14, 2024 15:25
@alexruzenhack alexruzenhack force-pushed the feat/nano-contract-transactions-component branch 8 times, most recently from 30f3fe4 to 82141bb Compare May 29, 2024 23:34
@alexruzenhack alexruzenhack force-pushed the feat/nano-contract-transaction-details-component branch 3 times, most recently from a946e8f to 12d5cc2 Compare June 1, 2024 00:41
const isHeightLocked = this.isHeightLocked(tx.height, nowHeight, rewardLock);

for (const output of tx.outputs) {
// Removed isAddressMine filter
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this comment? Removed from where?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

File removed.

}

for (const input of tx.inputs) {
// Removed isAddressMine filter
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

File removed.

* @param {string} tokenUid Token hash
* @param {Object[]} tokens Registered tokens from redux store
*/
function getTokenValue(tokenUid, tokens) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rename to getTokenSymbol? Value is misleading

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

File removed.

@alexruzenhack alexruzenhack force-pushed the feat/nano-contract-transaction-details-component branch from 85e37f7 to 43a9a85 Compare June 4, 2024 16:24
@alexruzenhack alexruzenhack force-pushed the feat/nano-contract-transactions-component branch from 72a5b61 to 4da4f91 Compare June 4, 2024 22:47
@alexruzenhack alexruzenhack force-pushed the feat/nano-contract-transaction-details-component branch 2 times, most recently from 33a6d7a to 34fffb2 Compare June 7, 2024 17:44

#: src/components/NanoContract/NanoContractTransactionBalanceListItem.component.js:109
msgid "Sent ${ tokenValue }"
msgstr "Enviado ${ symbol }"
Copy link
Contributor

@andreabadesso andreabadesso Jun 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this correct? Variable names is different

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

useEffect(() => {
// TODO: implement fetchActions to get actions of a transaction
const fetchActions = async () => {
// TODO: getActions must be implemented in the lib
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And should also be a saga

Will this PR wait until the lib is updated?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No. But I can rip off this component until we have the actions on each nano contract transaction.

<PrimaryTextButton title={t`See transaction details`} onPress={navigatesToExplorer} />
</TwoActionsWrapper>
</View>
{/* TODO: add <ArrowUpIcon /> when action list is ready to be showed */}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this a TODO? Will this PR be merged or wait the getActions method?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will be merged. But I will rip off this reference to actions. I believe it will be better.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Base automatically changed from feat/nano-contract-transactions-component to master June 12, 2024 21:23
@alexruzenhack alexruzenhack force-pushed the feat/nano-contract-transaction-details-component branch from 34fffb2 to a9caff1 Compare June 13, 2024 13:10
@alexruzenhack alexruzenhack merged commit 99f4997 into master Jun 14, 2024
2 checks passed
@alexruzenhack alexruzenhack deleted the feat/nano-contract-transaction-details-component branch June 14, 2024 02:26
andreabadesso pushed a commit that referenced this pull request Jun 24, 2024
* feat: add nano contract transaction screen
* feat: add nano contract transaction components
* Add FeedbackContent for no input/output on NanoContractTransactionBalanceList
* fix: navigation to NanoContractTransactionScreen
@tuliomir tuliomir mentioned this pull request Oct 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants