Skip to content

[CHIA-4278] Add WalletConnect fee estimation - #2834

Open
matt-o-how wants to merge 10 commits into
mainfrom
add_wc_fee_estimation
Open

[CHIA-4278] Add WalletConnect fee estimation#2834
matt-o-how wants to merge 10 commits into
mainfrom
add_wc_fee_estimation

Conversation

@matt-o-how

@matt-o-how matt-o-how commented Feb 4, 2026

Copy link
Copy Markdown
Contributor

This repository has access to calling the full node API, however this PR opts to implement the WalletConnect call through a new Wallet Node implementation added here


Note

Low Risk
Read-only wallet RPC with no signing or spending; exposure is limited to whitelisted WalletConnect/dapp paths similar to existing status queries.

Overview
WalletConnect and the GUI can request the wallet’s current fee-per-cost estimate via a new wallet RPC path, instead of routing fee estimation through the full node API.

WalletService.getFeeEstimate() calls get_fee_estimate and types the response as { feePerCost }. The React layer exposes useGetWalletFeeEstimateQuery (getWalletFeeEstimate on the wallet RTK slice). Electron chia_wallet.get_fee_estimate is registered with dapp alias chia_getFeeEstimate (no params, confirmation bypass), and the command is on both the renderer allowlist and the dapp no-confirmation allowlist—aligned with other read-only wallet queries like peer count and sync status.

Reviewed by Cursor Bugbot for commit c3db7eb. Bugbot is set up for automated code reviews on this repo. Configure here.

}

async getFeeEstimate() {
return this.command<{ feeEstimate: number }>('get_fee_estimate');

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Image

The above image is from getFeeEstimate of FullNode RPC API.

I'm not fully sure the new implementation you are going to add but are you sure you change the RPC interface for wallet service?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes - currently that's the plan - though perhaps I shouldn't. I'll revisit this.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please ping me when you decide the spec of the API!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Update: yes we are using a new Wallet implementation of getFeeEstimate not in the FullNode RPC API

@matt-o-how
matt-o-how force-pushed the add_wc_fee_estimation branch from 9ba5c80 to 26b5fd3 Compare March 5, 2026 22:41
@socket-security

socket-security Bot commented Mar 5, 2026

Copy link
Copy Markdown

No dependency changes detected. Learn more about Socket for GitHub.

👍 No dependency changes detected in pull request

@matt-o-how
matt-o-how marked this pull request as ready for review March 5, 2026 23:58
@matt-o-how
matt-o-how requested a review from a team as a code owner March 5, 2026 23:58

@ChiaMineJP ChiaMineJP left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It seems chia-blockchain's main branch hasn't yet implemented get_fee_estimate Wallet RPC endpoint for now.
I think we should merge this into GUI's main after the app implements the RPC.

@github-actions

github-actions Bot commented May 6, 2026

Copy link
Copy Markdown
Contributor

'This PR has been flagged as stale due to no activity for over 60
days. It will not be automatically closed, but it has been given
a stale-pr label and should be manually reviewed.'

@matt-o-how
matt-o-how force-pushed the add_wc_fee_estimation branch from 61aa59f to 0b922ce Compare June 17, 2026 14:33
Comment thread packages/api-react/src/services/wallet.ts

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit ebaee0e. Configure here.

Comment thread packages/gui/src/electron/commands/isAllowedCommand.ts Outdated
@danieljperry danieljperry changed the title Add WalletConnect fee estimation [CHIA-4278] Add WalletConnect fee estimation Jun 29, 2026
@matt-o-how
matt-o-how force-pushed the add_wc_fee_estimation branch from d075a06 to ea5a23f Compare July 1, 2026 14:09
@matt-o-how
matt-o-how requested a review from ChiaMineJP July 1, 2026 14:14

@ChiaMineJP ChiaMineJP left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

You accidentally include package-lock.json so please remove from this PR.

Comment thread packages/gui/src/electron/commands/isAllowedCommand.ts Outdated

@ChiaMineJP ChiaMineJP left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

You deleted the package-lock.json but I wanted to remove changes in package-lock.json so that the file doesn't appear in this PR.

@matt-o-how
matt-o-how requested a review from ChiaMineJP July 2, 2026 13:08
ChiaMineJP
ChiaMineJP previously approved these changes Jul 2, 2026
emlowe
emlowe previously approved these changes Jul 2, 2026
@matt-o-how
matt-o-how dismissed stale reviews from emlowe and ChiaMineJP via 335a633 July 6, 2026 14:43
@matt-o-how
matt-o-how force-pushed the add_wc_fee_estimation branch from 78839d1 to 335a633 Compare July 6, 2026 14:43
@matt-o-how
matt-o-how requested review from ChiaMineJP and emlowe July 6, 2026 18:07

@wjblanke wjblanke left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

aok

@danieljperry

Copy link
Copy Markdown
Contributor

@matt-o-how please resolve the comments for this PR.

@github-actions github-actions Bot removed the stale-pr label Jul 31, 2026
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.

5 participants