Skip to content

Commit 52146f1

Browse files
authored
Update for Web3.js v4.15.0 (#18)
1 parent 4875b30 commit 52146f1

File tree

9 files changed

+249
-377
lines changed

9 files changed

+249
-377
lines changed

templates/demo/web3js-react-dapp-demo/package-lock.json

+43-43
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

templates/demo/web3js-react-dapp-demo/package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@
2121
"typescript": "^4.9.5",
2222
"uuid": "^10.0.0",
2323
"web-vitals": "^2.1.4",
24-
"web3": "^4.14.0",
25-
"web3-eth": "^4.10.0",
26-
"web3-eth-contract": "^4.7.0"
24+
"web3": "^4.15.0",
25+
"web3-eth": "^4.11.0",
26+
"web3-eth-contract": "^4.7.1"
2727
},
2828
"scripts": {
2929
"start": "react-scripts start",

templates/demo/web3js-react-dapp-demo/src/Erc20Detail.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -141,11 +141,11 @@ function Erc20Detail({ address }: { address: string }) {
141141
setIsFormValid(false);
142142

143143
const gas: bigint = await erc20.methods
144-
.transfer(to, amount)
144+
.transfer(to as string, amount as string)
145145
.estimateGas({ from: account });
146146

147147
const gasPrice: bigint = await web3Context.web3.eth.getGasPrice();
148-
erc20.methods.transfer(to, amount).send({
148+
erc20.methods.transfer(to as string, amount as string).send({
149149
from: account,
150150
gas: gas.toString(),
151151
gasPrice: gasPrice.toString(),

0 commit comments

Comments
 (0)