Commit 1708b0f
committed
avoid double-settling Promise in checkWalletAvailability
TapAndPay environment Task invokes onComplete for both success and failure; our handler always resolve()d there, then also reject()d in addOnFailureListener. On failures this meant the same React Native Promise could be settled twice (resolve then reject), causing “Promise already settled” warnings and flaky JS-side behavior. Handle the result in a single callback and resolve once with task.isSuccessful.
(cherry picked from commit 6acaa43e50bc63f4ae48746849b36d2f00fe6d48)1 parent a17cde7 commit 1708b0f
1 file changed
Lines changed: 1 addition & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
| 110 | + | |
118 | 111 | | |
119 | 112 | | |
120 | 113 | | |
| |||
0 commit comments