diff --git a/examples/vue-app/package.json b/examples/vue-app/package.json index ace1c47e..a29762f9 100644 --- a/examples/vue-app/package.json +++ b/examples/vue-app/package.json @@ -51,7 +51,7 @@ } }, "browserslist": [ - "> 1%", - "last 2 versions" + "supports bigint", + "not dead" ] } diff --git a/examples/vue-app/src/App.vue b/examples/vue-app/src/App.vue index 37c4aa1b..694d19ae 100644 --- a/examples/vue-app/src/App.vue +++ b/examples/vue-app/src/App.vue @@ -371,7 +371,7 @@ export default defineComponent({ const el = document.querySelector("#console>pre"); const consoleBtn = document.querySelector("#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"; @@ -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); },