Repository navigation
fix(ui): wallet screen identity, state management, and input validation (#797) #800
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
Changes from 177 commits
64fab20
f42b58d
f8df452
64ca962
3cbf5ba
0cde65f
0879c45
4d8b2b2
17650e9
da00777
7668de9
1ec2e7e
0710295
e078d0b
7e95598
afd7a4c
64651c5
e2060b2
91314ca
508817a
0cb6d7e
a9f6c29
62961b1
d8285fa
12b7c53
1d0030d
d7badfe
08cecbb
c4c7b30
d51745f
227bbce
567e9be
a38c594
e6d72af
e908b82
c91d53b
1ac5292
56a1f2e
2f991f2
f0040f4
b29811c
19c4934
ab8a230
6a36d5f
f4efd64
1e59763
9d4d65a
60f9031
08495bf
c3af91a
77bdd70
67dfab7
4b1de7b
fe69656
4d47ea4
ddea453
0d4e359
b0df68b
d563250
3c316a5
4d6dd98
da4814a
78f25a8
89d8a97
aff86d9
1a8c047
ddcb742
6e2b2b0
3e744c8
839f1ee
3e2fac6
51b16b2
9bae9f8
ae63652
8dae295
f1f8ba9
565cbd2
019bce6
ce83455
9c07f95
df78e49
7e11a2b
e8eccc8
9790095
4ad1b1b
ed196d6
73f2f3b
63ce0e1
f16d982
875ee14
0d5a09d
6b41301
e41a72d
6e775a4
95782ae
a12cc6a
280820f
344c229
712049b
ee5b8a9
daa825b
b561c3e
f640aaa
6eed03c
9ee4e93
810a686
801f730
907cdda
21882ce
b52369e
bdb48aa
d488892
e693f15
54609a9
24a3521
a5e7930
a4be13b
7581713
8e2eb9c
e706c3f
e140c60
f2e8142
46ea490
cfa1dbb
05a4f20
c7a5ca7
acf4058
0e1a958
790453c
005cadf
92f2e70
3cd095e
e363c6d
49d9c5d
24256db
4187fff
bb0c6dc
f55b138
7046358
1dcf070
eaccb82
6a43e7c
5e4df1c
6efba25
642bd58
3c89c3a
5e934a0
d3faf5e
a51fb67
e2ba5fc
47c8821
631aa1a
b4fe404
ceb96af
d595fb5
d9d6ac9
8bab96b
8b73885
4d4ee72
1d91082
f3ca538
261fe9e
0b323c1
11578bd
c096105
e95a393
b475d1a
4889de7
f6b7bf7
d23388a
fabcb73
1e47bd3
1b276dd
b2076bb
7161398
52b5572
e057e52
3c8466a
1b507c9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -676,6 +676,21 @@ pub enum TaskError { | |
| #[error("Could not complete the payment. Please check your wallet balance and retry.")] | ||
| WalletPaymentFailed { detail: String }, | ||
|
|
||
| /// Could not access wallet information from the SPV manager. | ||
| #[error("Could not access wallet information. Please try again.")] | ||
| WalletInfoUnavailable, | ||
|
|
||
| /// Expected BIP44 account not found at the given index. | ||
| #[error("No BIP44 account found at the expected index. Please refresh your wallet.")] | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Our regular user will not understand it. Check persona and adjust message accordingly.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed in 3c8466a — rewritten for everyday user persona: "Your wallet needs to be refreshed before sending. Please refresh and try again." |
||
| MissingBip44Account { index: u32 }, | ||
|
|
||
| /// Could not derive a change address from the wallet account. | ||
| #[error("Could not derive a change address. Please try again.")] | ||
|
lklimek marked this conversation as resolved.
Resolved
|
||
| ChangeAddressDerivation { | ||
| #[source] | ||
| source: dash_sdk::dpp::key_wallet::Error, | ||
| }, | ||
|
|
||
| // ────────────────────────────────────────────────────────────────────────── | ||
| // Token query errors (identity / recipient validation) | ||
| // ────────────────────────────────────────────────────────────────────────── | ||
|
|
@@ -830,6 +845,16 @@ pub enum TaskError { | |
| source: Box<dash_sdk::Error>, | ||
| }, | ||
|
|
||
| /// The nonce used for a shielded transaction was stale. The wallet's cached | ||
| /// nonce was behind Platform's expected nonce. Retrying will use the correct nonce. | ||
| #[error( | ||
| "The transaction used an outdated sequence number. Please retry — the wallet will use the correct number automatically." | ||
| )] | ||
| ShieldedNonceMismatch { | ||
| #[source] | ||
| source_error: Box<dash_sdk::Error>, | ||
| }, | ||
|
|
||
| /// The address used for a shielded transaction does not have enough locked funds. | ||
| #[error( | ||
| "Not enough funds locked for this shielded transaction. \ | ||
|
|
@@ -1006,6 +1031,13 @@ pub fn shielded_broadcast_error(e: SdkError) -> TaskError { | |
| source_error: Box::new(e), | ||
| }; | ||
| } | ||
| if let Some(ConsensusError::StateError(StateError::AddressInvalidNonceError(_))) = | ||
| consensus_error | ||
| { | ||
| return TaskError::ShieldedNonceMismatch { | ||
| source_error: Box::new(e), | ||
| }; | ||
| } | ||
| TaskError::ShieldedBroadcastFailed { | ||
| source: Box::new(e), | ||
| } | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.