-
Notifications
You must be signed in to change notification settings - Fork 25
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: NanoContractTransactions component [11] #438
feat: NanoContractTransactions component [11] #438
Conversation
a62289f
to
243c126
Compare
1e13c7d
to
593332c
Compare
674669c
to
a369c8c
Compare
593332c
to
d0fd277
Compare
e5fdf24
to
a56f2fc
Compare
a0eb3e7
to
ab34b66
Compare
a56f2fc
to
083f44e
Compare
8787ed7
to
4b08adc
Compare
src/components/NanoContract/NanoContractTransactionsListHeader.component.js
Outdated
Show resolved
Hide resolved
src/components/NanoContract/NanoContractTransactionsListHeader.component.js
Outdated
Show resolved
Hide resolved
4b08adc
to
5dd87b1
Compare
5dd87b1
to
30f3fe4
Compare
src/sagas/mixins.js
Outdated
|
||
const log = logger('mixins'); | ||
|
||
export function* fetchAllWalletAddresses() { |
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.
Why is this a "mixin"?
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.
Because there is a pattern for the sagas, they are being used in cycles and major features that also have cycles. This one doesn't belong to a cycle nor to a major feature. Therefore I created this space for standalone effects. It should aggregate future standalone effects as well.
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 understand that most of the sagas in src/sagas/wallet.js
are related to the wallet load/update "cycle", but not all of them are, like the onResetWallet
IMHO all sagas that are related to the wallet should be in src/sagas/wallet.js
, just like all sagas related to "tokens" are in src/sagas/tokens.js
We can discuss having a different structure, like having sagas especifically for those "cycles", but I don't think it should be done in this PR
src/sagas/mixins.js
Outdated
|
||
const log = logger('mixins'); | ||
|
||
export function* fetchAllWalletAddresses() { |
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 understand that most of the sagas in src/sagas/wallet.js
are related to the wallet load/update "cycle", but not all of them are, like the onResetWallet
IMHO all sagas that are related to the wallet should be in src/sagas/wallet.js
, just like all sagas related to "tokens" are in src/sagas/tokens.js
We can discuss having a different structure, like having sagas especifically for those "cycles", but I don't think it should be done in this PR
* feat: add nano contract screen * feat: add nano contract components * feat: improve NanoContractTransactionsList component * feat: add init effect on sagas/nanoContract * refactor: rename NanoContractTransactions* to NanoContractDetails* * refactor: use consumeAsyncIterator from utils * refactor: change oneline style to use unicode no-break space * refactor: extract getAllAddresses as utility fn * feat: add "offcard" prop to FeedbackContent component * refactor: move fetch all wallet addresses to a saga effect on sagas/mixins * refactor: move effects from mixins to wallet * refactor: remove mixins from sagas/index.js
Acceptance Criteria
NanoContractDetailsScreen
: it renders details components of a selected Nano ContractNanoContractDetails
component: it manages details components and some call to actionsNanoContractDetailsHeader
component: it renders some Nano Contract informationNanoContractTransactionsListItem
: it renders a transaction's summary for each item in a list the Nano Contract's transactionsUnregisterNanoContractModal
componentSelectAddressModal
componentFeedbackContent
componentNoNanoContract
component once we already have a generalized componentFeedbackContent
registeredNanoContractsIter
to MemoryStoregetRegisteredNanoContracts
helper to retrieve the list of registered Nano ContractsNANOCONTRACT_HISTORY_LOADING
to assist the history loading process, and add reducer to handle the eventNANOCONTRACT_INIT
and addinit
effect on sagas/nanoContractNano Contract Details Screen
nc-transactions-recording.mp4
Nano Contract Details loading history
![](https://private-user-images.githubusercontent.com/5992210/336633221-40fcf763-b453-4378-abdd-cad99906a7e2.jpeg?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1NjU3MDMsIm5iZiI6MTczOTU2NTQwMywicGF0aCI6Ii81OTkyMjEwLzMzNjYzMzIyMS00MGZjZjc2My1iNDUzLTQzNzgtYWJkZC1jYWQ5OTkwNmE3ZTIuanBlZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE0VDIwMzY0M1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTAyMmYzMzIzYjEwMTk5ZWVhMWY4ODQzYjM3MGJlMDViZGQ0YTkzMDM3YzM2YjkxYzRlMWJlMWJmNGFhNjkzZWUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.IAra0dYJg6H9R8OrrPAvUWnCih8jyNYiEPHKJBylWfs)
Nano Contract Details after error on transactions history load
![](https://private-user-images.githubusercontent.com/5992210/335761667-14b7e47c-5249-4fcb-8f36-24ec3a4d786e.jpeg?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1NjU3MDMsIm5iZiI6MTczOTU2NTQwMywicGF0aCI6Ii81OTkyMjEwLzMzNTc2MTY2Ny0xNGI3ZTQ3Yy01MjQ5LTRmY2ItOGYzNi0yNGVjM2E0ZDc4NmUuanBlZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE0VDIwMzY0M1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTA1OGYyOTI0ZTNkZTQzODJmNTljNzQ3ZDA1ZjAwZjZmZGJmMjIxZWQ5MGVjNTc2YmU0MTcxMjRkYWEwZjIwMjgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.PliLBOgW1sESBi4wPz-mQJjODPfyVfH2ZYwUESZCzXI)
Select Address Loading
![](https://private-user-images.githubusercontent.com/5992210/337737604-7242ecba-ec98-4126-a066-426ca97b2dbb.jpeg?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1NjU3MDMsIm5iZiI6MTczOTU2NTQwMywicGF0aCI6Ii81OTkyMjEwLzMzNzczNzYwNC03MjQyZWNiYS1lYzk4LTQxMjYtYTA2Ni00MjZjYTk3YjJkYmIuanBlZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE0VDIwMzY0M1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTVlNjZlYWU4ZWZlMmY5ZTg1OGI1NzFjYzc4MGY3YjgxODAxZTczZTY4MzM1Nzg0NTFmNDM1YzNiMDQ0MThjZjcmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.ZuTTVVjq_84inZBzVckHJUPFPl2KHbLxJiyzR1gZARk)
Select Address Loading Error
![](https://private-user-images.githubusercontent.com/5992210/337737466-6aa1dc30-2b11-41bc-a149-5ef4a833073e.jpeg?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1NjU3MDMsIm5iZiI6MTczOTU2NTQwMywicGF0aCI6Ii81OTkyMjEwLzMzNzczNzQ2Ni02YWExZGMzMC0yYjExLTQxYmMtYTE0OS01ZWY0YTgzMzA3M2UuanBlZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE0VDIwMzY0M1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTlhODI3NDk5ZmEyNTJmZWVlOGU2ZjkxZjdhYWNiZGU5ZTM3ZWI5ZTMxNWMxZTI0Zjg2YTE3ZjNjNDBmNjM5N2ImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.6CgmTnwiZN8wxFA2ILDbbXqTfMa0y2k-DnuuwOVy6Qw)
Note
It depends on:
Security Checklist