Skip to content

Commit

Permalink
fix: fetch the gas price from RPC (#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
impelcrypto authored Jan 9, 2024
1 parent 8498ac7 commit 0036c1b
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/hooks/useRegister.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,13 @@ import { Contract } from 'web3-eth-contract';
import { stringToHex } from '@polkadot/util';
import { getInjector, getSelectedAccount } from 'src/modules/wallet/utils';
import { decodeAddress } from '@polkadot/util-crypto';
import { isHex, u8aToHex } from '@polkadot/util';
import { u8aToHex } from '@polkadot/util';
import { init, recover } from './ecdsa_recover';

const ecdsaSignMsg = '<Bytes>Sign to register for astarpass</Bytes>';
const signMessage = stringToHex('Sign this to register to AstarBase for:');
const PREFIX = '3c42797465733e';
const POSTFIX = '3c2f42797465733e';
const GAS_PRICE = '10000000000';
const GAS_LIMIT = '300000';

export const useRegister = () => {
const store = useStore();
Expand Down Expand Up @@ -73,8 +71,6 @@ export const useRegister = () => {
.send({
to: astarBaseContractAddress.value,
from: account.value,
gasLimit: GAS_LIMIT,
gasPrice: GAS_PRICE,
})
.once('error', (err: any) => {
console.error(err);
Expand Down

0 comments on commit 0036c1b

Please sign in to comment.