main branch uses a combination of non-invasive changes to show the filter ordinals
dev branch uses hooks
Whether or not to show the FilterOrdinalsModal is a part of BTCWalletProvider. Initially I went with the BTCWalletProvider handling the "show/no show" the modal and shouldFilterOrdinals to be a part of AppState. But then we cannot just put the FilterOrdinalsModal inside this provider, since it has to consume AppStateshouldFilterOrdinals commit: af8ea0bf8eda03f3ec21e30fec0e9aad621d7487
But then I switched to even simpler solution - filtering ordinals (modal, should show modal, should filter or not) is just a part of BTCWalletProvider. Commit: e366a752447fe88b5a161163c8efae16078e8c09
This solution provides us an easier way to manage the stuff. Also, as soon as this modal is a part of Tomo wallet connect, we can easier get rid of the modal itself, so as we will get Tomos internal "should filter ordinals or not"
If you want to place ordinal's logic inside BTCWalletProvider then you need modify getUtxos method cause currently it ignores your shouldFilterOrdinals flag and always return all UTXOs.
main
branch uses a combination of non-invasive changes to show the filter ordinalsdev
branch uses hooksWhether or not to show the
FilterOrdinalsModal
is a part ofBTCWalletProvider
. Initially I went with theBTCWalletProvider
handling the "show/no show" the modal andshouldFilterOrdinals
to be a part ofAppState
. But then we cannot just put theFilterOrdinalsModal
inside this provider, since it has to consumeAppState
shouldFilterOrdinals
commit: af8ea0bf8eda03f3ec21e30fec0e9aad621d7487But then I switched to even simpler solution - filtering ordinals (modal, should show modal, should filter or not) is just a part of BTCWalletProvider. Commit: e366a752447fe88b5a161163c8efae16078e8c09
This solution provides us an easier way to manage the stuff. Also, as soon as this modal is a part of Tomo wallet connect, we can easier get rid of the modal itself, so as we will get Tomos internal "should filter ordinals or not"