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

UFT-1398 Fix WalletConnect cost estimation failing #26

Merged
merged 3 commits into from
Apr 15, 2024

Conversation

Radiokot
Copy link
Member

Purpose

Fix WalletConnect cost estimation failing if the smart contract call parameters are large.

Changes

  • Replace asking wallet proxy for transaction cost with local fee estimation for WalletConnect Update transactions

Checklist

  • My code follows the style of this project.
  • The code compiles without warnings.
  • I have performed a self-review of the changes.
  • I have documented my code, in particular the intent of the
    hard-to-understand areas.

With the local estimation we are not restricted by GET request query
size limit and can handle quite big smart contract parameters.
Copy link

linear bot commented Apr 12, 2024

UFT-1398 Android wallets - Insufficient energy when casting a vote

Deploying locally all the components and trying to use the election dApp resulted with insufficient energy. I was trying to cast a vote with Concordium seedphrase wallet on Android 1.5.1 (70).

To reproduce:

  1. Use the test script to deploy the election but comment out the voting function so that the script doesn't perform voting.
  2. Run the election setup with min 5 nominees.
  3. Build and deploy the dApp
  4. Serve all the necessary files for the dApp.
  5. Cast a vote with seedphrase wallet. Select candidate number 3.

Result:

Insufficient energy.

Expected result:

User should be able to cast a vote.

Note:

The issue is triggered if the number of nominees is 5. With 3 nominees, it is possible to cast a vote.

To reproduce issue with Test-bench:

  1. Connect to test bench using wallet connect.
  2. In the first case ((IP) Testing simple input parameters) select function: String.
  3. In the input parameter paste the 60000 characters string that is in the file attached.
  4. Select Set string value

Result:

Notice that at the time the signature page pops up in the wallet, there is a toast error message (communication error). The transaction fails, insufficient energy.

Expected:

Transaction passes successfully.

In this case energy assigned by the dApp should be used as the actual energy.

Attachments

insufficient_energy.mp4

large_string.txt

@Radiokot Radiokot requested a review from abizjak April 12, 2024 16:11
@Radiokot Radiokot merged commit 90c6150 into main Apr 15, 2024
1 check passed
@Radiokot Radiokot deleted the fix/UFT-1398-wc-cost-estimation-failing branch April 15, 2024 13:33
Radiokot added a commit to Concordium/concordium-reference-wallet-android that referenced this pull request Apr 16, 2024
## Purpose

Fix WalletConnect cost estimation failing if the smart contract call
parameters are large.
The changes are the same as in
Concordium/cryptox-android#26

## Changes

- Replace asking wallet proxy for transaction cost with local fee
estimation for WalletConnect Update transactions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants