Skip to content
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

Fixes on responding to dApp and assertions #1290

Merged
merged 3 commits into from
Dec 20, 2024

Conversation

micbakos-rdx
Copy link
Contributor

Description

  • When analysis fails, when responding back to dApp the message of the throwable, or the message of the cause of the throwable, is communicated back to CE.
  • The manifest modification regarding assertions was incorrectly placing the predicted and not the calculated guaranteed amount to the assertion.

@@ -268,8 +268,6 @@ class TransactionReviewViewModel @Inject constructor(
}

fun dismissTerminalErrorDialog() {
_state.update { it.copy(error = null) }
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error was consumed here, before having the chance to be sent to dApp.

@@ -471,7 +471,7 @@ fun Throwable.getDappMessage(): String? {
"Wallet is using network ID: $currentNetworkId, request sent specified network ID: $requestNetworkId"
}

else -> message
else -> message ?: cause?.message
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some errors carry a cause from the CommonException coming from sargon. This message can be passed back to the CE logs.

@@ -326,7 +326,7 @@ class TransactionSubmitDelegateImpl @Inject constructor(
val fungibleAsset = (transferable.asset as? Asset.Fungible) ?: return@mapNotNull null

TransactionGuarantee(
amount = amount.estimated,
amount = amount.guaranteed,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The amount in the builder is for guaranteed amounts and not for predicted.

@giannis-rdx giannis-rdx merged commit bd73d41 into hotfix/1.11.2 Dec 20, 2024
10 checks passed
@giannis-rdx giannis-rdx deleted the hotfix/error-to-dapp branch December 20, 2024 19:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants