Skip to content

Commit

Permalink
send type and gasLimit for send eth
Browse files Browse the repository at this point in the history
  • Loading branch information
chaitanyapotti committed Sep 8, 2023
1 parent 672ce4d commit f9bc45a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions examples/vue-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
}
},
"browserslist": [
"> 1%",
"last 2 versions"
"supports bigint",
"not dead"
]
}
4 changes: 2 additions & 2 deletions examples/vue-app/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ export default defineComponent({
const el = document.querySelector("#console>pre");
const consoleBtn = document.querySelector<HTMLElement>("#console>div.clear-console-btn");
if (el) {
el.innerHTML = JSON.stringify(args || {}, null, 2);
el.innerHTML = JSON.stringify(args || {}, (key, value) => (typeof value === "bigint" ? value.toString() : value), 2);
}
if (consoleBtn) {
consoleBtn.style.display = "block";
Expand Down Expand Up @@ -399,7 +399,7 @@ export default defineComponent({
sendEth() {
const { web3 } = web3Obj;
web3.eth
.sendTransaction({ from: this.publicAddress, to: this.publicAddress, value: web3.utils.toWei("0.01", "ether") })
.sendTransaction({ from: this.publicAddress, to: this.publicAddress, value: web3.utils.toWei("0.01", "ether"), type: "0x2", gasLimit: 21000 })
.then((resp) => this.console(resp))
.catch(console.error);
},
Expand Down

0 comments on commit f9bc45a

Please sign in to comment.