File tree Expand file tree Collapse file tree 2 files changed +11
-29
lines changed Expand file tree Collapse file tree 2 files changed +11
-29
lines changed Original file line number Diff line number Diff line change @@ -89,7 +89,7 @@ android {
89
89
applicationId " com.walletconnect.web3wallet.rnsample"
90
90
minSdkVersion rootProject. ext. minSdkVersion
91
91
targetSdkVersion rootProject. ext. targetSdkVersion
92
- versionCode 50
92
+ versionCode 51
93
93
versionName " 1.0"
94
94
resValue " string" , " build_config_package" , " com.walletconnect.web3wallet.rnsample"
95
95
}
Original file line number Diff line number Diff line change @@ -151,36 +151,18 @@ const fetchGasPrice = async (chainId: string) => {
151
151
const data = await result . json ( ) ;
152
152
console . log ( 'fetchGasPrice:' , data ) ;
153
153
return data ?. data ;
154
-
155
- // const result = {
156
- // data: {
157
- // fast: {
158
- // estimated_seconds: 0,
159
- // front_tx_count: 0,
160
- // level: 'fast',
161
- // price: 11006500,
162
- // priority_price: 1200000,
163
- // },
164
- // normal: {
165
- // estimated_seconds: 0,
166
- // front_tx_count: 0,
167
- // level: 'normal',
168
- // price: 1200800,
169
- // priority_price: 1100000,
170
- // },
171
- // slow: {
172
- // estimated_seconds: 0,
173
- // front_tx_count: 0,
174
- // level: 'slow',
175
- // price: 1000600,
176
- // priority_price: 1000000,
177
- // },
178
- // },
179
- // success: true,
180
- // };
181
- return result . data ;
182
154
} ;
183
155
156
+ export async function getTransactionGas ( tx : any , chainId : string ) {
157
+ const chainData = PresetsUtil . getChainData ( parseChainId ( chainId ) ) ;
158
+ const provider = new ethers . providers . JsonRpcProvider ( chainData . rpcUrl ) ;
159
+ const feeData = await provider . getFeeData ( ) ;
160
+ return {
161
+ maxFeePerGas : feeData . maxFeePerGas ,
162
+ maxPriorityFeePerGas : feeData . maxPriorityFeePerGas ,
163
+ } ;
164
+ }
165
+
184
166
export async function calculateGasLimit ( tx : any , chainId : string ) {
185
167
const chainData = PresetsUtil . getChainData ( parseChainId ( chainId ) ) ;
186
168
const provider = new ethers . providers . JsonRpcProvider ( chainData . rpcUrl ) ;
You can’t perform that action at this time.
0 commit comments