File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
packages/kit-bg/src/providers Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import BigNumber from 'bignumber.js';
55
66import { ETHMessageTypes } from '@onekeyhq/engine/src/types/message' ;
77import type { EvmExtraInfo } from '@onekeyhq/engine/src/types/network' ;
8+ import { conflux } from '@onekeyhq/engine/src/vaults/impl/cfx/sdk' ;
89import type { IEncodedTxCfx } from '@onekeyhq/engine/src/vaults/impl/cfx/Vault' ;
910import type VaultConflux from '@onekeyhq/engine/src/vaults/impl/cfx/Vault' ;
1011import { getActiveWalletAccount } from '@onekeyhq/kit/src/hooks' ;
@@ -232,6 +233,12 @@ class ProviderApiConflux extends ProviderApiBase {
232233 request : IJsBridgeMessagePayload ,
233234 transaction : IEncodedTxCfx ,
234235 ) {
236+ const gasPrice = new BigNumber ( transaction . gasPrice ?? 0 ) ;
237+
238+ if ( gasPrice . isLessThan ( conflux . CONST . MIN_GAS_PRICE ) ) {
239+ delete transaction . gasPrice ;
240+ }
241+
235242 debugLogger . providerApi . info ( 'cfx_sendTransaction' , request , transaction ) ;
236243 const result = await this . backgroundApi . serviceDapp ?. openSignAndSendModal (
237244 request ,
You can’t perform that action at this time.
0 commit comments