From caa432806f9c3360e3a837b8355f671c2919b5db Mon Sep 17 00:00:00 2001 From: BokkyPooBah Date: Wed, 1 May 2024 17:45:23 +1000 Subject: [PATCH] offline upload tx data wip --- docs/offline.html | 36 ++++++++++++++++++++++++++++++++++++ docs/online.html | 2 ++ 2 files changed, 38 insertions(+) diff --git a/docs/offline.html b/docs/offline.html index cda8b58..f6ac6c5 100644 --- a/docs/offline.html +++ b/docs/offline.html @@ -292,6 +292,27 @@ + + + + + + +
+                    
+{{ loadTx }}
+                    
+                  
+
+ + + + + @@ -531,6 +552,9 @@ chains: {}, + loadTxFile: null, + loadTx: {}, + connected: false, chainId: null, coinbase: null, @@ -867,6 +891,18 @@ // --- METHODS --- methods: { + async loadJSON(fileName, fileList) { + console.log(moment().format("HH:mm:ss") + " loadJSON"); + const reader = new FileReader(); + this.loadTx = {}; + const t = this; + reader.onload = function (event) { + const data = event.target.result; + t.loadTx = JSON.parse(data); + }; + await reader.readAsText(fileList[0]); + }, + updateURL(where) { console.log(moment().format("HH:mm:ss") + " TODO updateURL: " + where); }, diff --git a/docs/online.html b/docs/online.html index 8935628..9c055f3 100644 --- a/docs/online.html +++ b/docs/online.html @@ -966,6 +966,7 @@ data: data.data, nonce: this.prepare.nonce, chainId: this.prepare.chainId, + accessList: [], }; } } else { @@ -977,6 +978,7 @@ data: null, nonce: this.prepare.nonce, chainId: this.prepare.chainId, + accessList: [], }; } if (this.prepare.tx) {