Commit d03434a
authored
fix(tokens): resolve token via tokenCoordinator when stateFlow race loses (#1018)
The ConfirmPhantomTransaction and Coinbase purchase handlers read
stateFlow.value.tokenWithBalance?.token synchronously. After the
amount-entry refactor the async combine flow that populates
tokenWithBalance can lose the race, leaving the snapshot null.
Extract resolveToken() that falls back to
tokenCoordinator.getTokenMetadata(mint) (memory -> Room -> network)
when the flow hasn't delivered yet.
Also bumps phantom-connect-kmp 2.0.2-1.0.0 -> 2.0.2-1.0.1.
Signed-off-by: Brandon McAnsh <git@bmcreations.dev>1 parent ff6fd4a commit d03434a
2 files changed
Lines changed: 16 additions & 7 deletions
Lines changed: 15 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
599 | 599 | | |
600 | 600 | | |
601 | 601 | | |
602 | | - | |
603 | | - | |
604 | | - | |
605 | | - | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
606 | 608 | | |
607 | 609 | | |
608 | 610 | | |
| |||
839 | 841 | | |
840 | 842 | | |
841 | 843 | | |
842 | | - | |
843 | | - | |
| 844 | + | |
844 | 845 | | |
845 | 846 | | |
846 | 847 | | |
| |||
861 | 862 | | |
862 | 863 | | |
863 | 864 | | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
864 | 873 | | |
865 | 874 | | |
866 | 875 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
96 | | - | |
| 96 | + | |
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
| |||
0 commit comments