diff --git a/installer/sashimono-install.sh b/installer/sashimono-install.sh index cc5752a..9663229 100755 --- a/installer/sashimono-install.sh +++ b/installer/sashimono-install.sh @@ -326,7 +326,7 @@ else fi if [[ "$NO_MB" == "" && -f $MB_XRPL_DATA/mb-xrpl.cfg ]]; then - ! sudo -u "$MB_XRPL_USER" MB_DATA_DIR="$MB_XRPL_DATA" node "$MB_XRPL_BIN" upgrade $EVERNODE_GOVERNOR_ADDRESS && rollback + ! sudo -u "$MB_XRPL_USER" MB_DATA_DIR="$MB_XRPL_DATA" node "$MB_XRPL_BIN" upgrade && rollback fi # Install Sashimono Agent systemd service. diff --git a/installer/setup.sh b/installer/setup.sh index f6298b3..eae5e18 100755 --- a/installer/setup.sh +++ b/installer/setup.sh @@ -1795,9 +1795,6 @@ elif [ "$mode" == "list" ]; then sashi list elif [ "$mode" == "update" ]; then - config_json_path="$SASHIMONO_BIN/evernode-setup-helpers/configuration.json" - export EVERNODE_GOVERNOR_ADDRESS=${OVERRIDE_EVERNODE_GOVERNOR_ADDRESS:-$(jq -r ".$NETWORK.governorAddress" $config_json_path)} - update_evernode elif [ "$mode" == "log" ]; then diff --git a/mb-xrpl/app.js b/mb-xrpl/app.js index 9bcb790..6143755 100644 --- a/mb-xrpl/app.js +++ b/mb-xrpl/app.js @@ -46,8 +46,8 @@ async function main() { else if (process.argv.length === 4 && process.argv[2] === 'reginfo' && process.argv[3] === 'basic') { await new Setup().regInfo(true); } - else if (process.argv.length === 4 && process.argv[2] === 'upgrade') { - await new Setup().upgrade(process.argv[3]); + else if (process.argv.length >= 3 && process.argv[2] === 'upgrade') { + await new Setup().upgrade(); } else if ((process.argv.length === 8) && process.argv[2] === 'reconfig') { if (process.argv[5] == '-') process.argv[5] = null; diff --git a/mb-xrpl/lib/setup.js b/mb-xrpl/lib/setup.js index 9b6e1d4..031f99e 100644 --- a/mb-xrpl/lib/setup.js +++ b/mb-xrpl/lib/setup.js @@ -220,7 +220,7 @@ class Setup { } // Upgrades existing message board data to the new version. - async upgrade(governorAddress) { + async upgrade() { // Do a simple version change in the config. const cfg = this.#getConfig(); @@ -230,21 +230,6 @@ class Setup { if (!cfg.xrpl.rippledServer) cfg.xrpl.rippledServer = appenv.DEFAULT_RIPPLED_SERVER - if (!cfg.xrpl.governorAddress) { - await setEvernodeDefaults(cfg.xrpl.network, governorAddress, cfg.xrpl.rippledServer); - - const hostClient = new evernode.HostClient(cfg.xrpl.address, cfg.xrpl.secret); - await hostClient.connect(); - - evernode.Defaults.set({ - xrplApi: hostClient.xrplApi - }); - - cfg.xrpl.governorAddress = governorAddress; - - await hostClient.disconnect(); - } - this.#saveConfig(cfg); await Promise.resolve(); // async placeholder. @@ -602,10 +587,10 @@ class Setup { const acc = this.#getConfig().xrpl; await setEvernodeDefaults(acc.network, acc.governorAddress, acc.rippledServer); - if(regularKey){ + if (regularKey) { console.log(`Setting Regular Key...`); } - else{ + else { console.log(`Deleting Regular Key...`); } @@ -619,10 +604,10 @@ class Setup { await xrplAcc.setRegularKey(regularKey); - if(regularKey){ + if (regularKey) { console.log(`Regular key ${regularKey} was assigned to account ${acc.address} successfully.`); - } - else{ + } + else { console.log(`Regular key was deleted from account ${acc.address} successfully.`); }