-
Notifications
You must be signed in to change notification settings - Fork 55
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
Refactor/show utxos #805
Refactor/show utxos #805
Conversation
src/components/Send/ShowUtxos.tsx
Outdated
} | ||
}, | ||
[frozenUtxos, unFrozenUtxos, setUnFrozenUtxos, setFrozenUtxos], | ||
) |
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 think shortening this piece of code would give the same results. Not sure though, please go through this.
@@ -160,7 +160,7 @@ const UtxoRow = memo( | |||
type="checkbox" | |||
checked={checked} | |||
onChange={() => { | |||
onToggle && onToggle(utxoIndex, isFrozen) |
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 will happen to isFrozen
that we're not getting from above, how would you handle frozen utxo and non-frozen utxo?
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.
utxo
will contain all the properties of the particularly selected utxo. So to access isFrozen
property we can use utxo.isFrozen
. Basically we are trying to access whole utxo instead of just one of its property isFrozen
.
I thought of doing that. But |
In the show Utxos file, Instead of passing a single parameter
isFrozen
totoggle
function, passing wholeutxo
data is better. As utxo's other data is need in fidelity bond section.I am not able to review the changes due to some backend issue :(