diff --git a/examples/client/client.js b/examples/client/client.js index 2790687..e4d7440 100644 --- a/examples/client/client.js +++ b/examples/client/client.js @@ -57,7 +57,7 @@ async function main() { hpc.on(HotPocket.events.contractOutput, (r) => { r.outputs.forEach(output => { - // If bson.deserialize error occured it'll be caught by this try catch. + // If bson.deserialize error occurred it'll be caught by this try catch. try { const result = bson.deserialize(output); diff --git a/installer/jshelper/index.js b/installer/jshelper/index.js index 84e0407..6de6674 100644 --- a/installer/jshelper/index.js +++ b/installer/jshelper/index.js @@ -61,6 +61,34 @@ const funcs = { return { success: false, result: "Account not found." }; await hostClient.connect(); + + if (validateFor === "register" || validateFor === "re-register") { + // Check whether is there any missed NFT sell offers + try { + const registryAcc = new evernode.XrplAccount(hostClient.config.registryAddress, null); + const regUriToken = await hostClient.getRegistrationUriToken(); + + if (!regUriToken) { + const regInfo = await hostClient.getHostInfo(accountAddress); + + if (regInfo) { + const sellOffer = (await registryAcc.getURITokens()).find(o => o.index == regInfo.uriTokenId && o.Amount); + + if (sellOffer) { + await hostClient.disconnect(); + await xrplApi.disconnect(); + return { success: true }; + } + } + } + + } catch (e) { + await hostClient.disconnect(); + await xrplApi.disconnect(); + return { success: false, result: 'Error occurred in missed sell offers check.' }; + } + } + const registered = await hostClient.isRegistered(); // For register validation the host should not be registered in evernode. // For other validations host should be registered in evernode. diff --git a/installer/sashimono-uninstall.sh b/installer/sashimono-uninstall.sh index 1eadd63..e810363 100755 --- a/installer/sashimono-uninstall.sh +++ b/installer/sashimono-uninstall.sh @@ -134,7 +134,7 @@ if [ -f $SASHIMONO_BIN/docker-registry-uninstall.sh ]; then fi # Delete binaries except message board and sashimnono uninstall script. -# We keep uninstall script so user can uninstall again if error occured at later steps. +# We keep uninstall script so user can uninstall again if error occurred at later steps. # We'll remove these after deregistration. echo "Deleting binaries..." find $SASHIMONO_BIN -mindepth 1 ! \( -regex "^$MB_XRPL_BIN\(/.*\)?" -o -path $SASHIMONO_BIN/sashimono-uninstall.sh \) -delete diff --git a/mb-xrpl/lib/setup.js b/mb-xrpl/lib/setup.js index 4d99c19..7993359 100644 --- a/mb-xrpl/lib/setup.js +++ b/mb-xrpl/lib/setup.js @@ -214,7 +214,7 @@ class Setup { await hostClient.disconnect(); } catch { - throw 'Error occured when retrieving account info.'; + throw 'Error occurred when retrieving account info.'; } } } diff --git a/src/sqlite.cpp b/src/sqlite.cpp index 22b5222..fd784d5 100644 --- a/src/sqlite.cpp +++ b/src/sqlite.cpp @@ -91,7 +91,7 @@ namespace sqlite char *err_msg; if (sqlite3_exec(db, sql.data(), callback, (callback != NULL ? (void *)callback_first_arg : NULL), &err_msg) != SQLITE_OK) { - LOG_ERROR << "SQL error occured: " << err_msg; + LOG_ERROR << "SQL error occurred: " << err_msg; sqlite3_free(err_msg); return -1; } diff --git a/test/vm-cluster/cluster.sh b/test/vm-cluster/cluster.sh index ffb5b3f..5ccf233 100755 --- a/test/vm-cluster/cluster.sh +++ b/test/vm-cluster/cluster.sh @@ -208,7 +208,7 @@ if [ $mode == "reconfig" ]; then fi if ! sshskp $sshuser@$hostaddr $command ; then - printf "$PRINTFORMAT" "$nodeno" "Error occured reconfiguring sashimono." + printf "$PRINTFORMAT" "$nodeno" "Error occurred reconfiguring sashimono." else # Remove host info if reinstall. if [ ! -z $reinstall ] && [ $reinstall == "R" ]; then @@ -402,7 +402,7 @@ if [ $mode == "docker-pull" ]; then command="$contractpath && $user && $dpull" if ! sshskp $sshuser@$hostaddr $command 1>/dev/null; then - printf "$PRINTFORMAT" "$nodeno" "Error occured pulling $image." + printf "$PRINTFORMAT" "$nodeno" "Error occurred pulling $image." else printf "$PRINTFORMAT" "$nodeno" "Successfully pulled $image." fi