Skip to content

Commit

Permalink
update monero-project to v0.17.1.1
Browse files Browse the repository at this point in the history
bump version to 0.4.6
nodejs >= 10.0.0
update dist files
  • Loading branch information
woodser committed Nov 4, 2020
1 parent eaeda13 commit a0884bb
Show file tree
Hide file tree
Showing 17 changed files with 29 additions and 22 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Monero JavaScript Library

A Node.js library for creating Monero applications using RPC and WebAssembly bindings to [monero v0.17.0.1 'Oxygen Orion'](https://github.com/monero-project/monero/tree/v0.17.0.1).
A Node.js library for creating Monero applications using RPC and WebAssembly bindings to [monero v0.17.1.1 'Oxygen Orion'](https://github.com/monero-project/monero/tree/v0.17.1.1).

* Supports wallet and daemon RPC clients.
* Supports client-side wallets in Node.js or the browser using WebAssembly.
Expand Down
8 changes: 4 additions & 4 deletions bin/update_submodules.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ git submodule update --init --recursive

# update monero-cpp
cd ./external/monero-cpp
git checkout tags/v0.3.6
git pull --ff-only origin tags/v0.3.6
git checkout tags/v0.3.7
git pull --ff-only origin tags/v0.3.7

# update monero-core
cd ./external/monero-core
git checkout tags/v0.17.0.1
git pull --ff-only origin tags/v0.17.0.1
git checkout tags/v0.17.1.1
git pull --ff-only origin tags/v0.17.1.1
cd ../../../../
6 changes: 3 additions & 3 deletions dist/MoneroWebWorker.dist.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/MoneroWebWorker.dist.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/monero_core.js

Large diffs are not rendered by default.

Binary file modified dist/monero_core.wasm
Binary file not shown.
2 changes: 1 addition & 1 deletion dist/monero_core_keys.js

Large diffs are not rendered by default.

Binary file modified dist/monero_core_keys.wasm
Binary file not shown.
2 changes: 1 addition & 1 deletion external/monero-cpp
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "monero-javascript",
"description": "A JavaScript library for using Monero",
"version": "0.4.5",
"version": "0.4.6",
"license": "MIT",
"repository": "https://github.com/monero-ecosystem/monero-javascript",
"private": false,
Expand All @@ -22,6 +22,9 @@
}
]
},
"engines": {
"node": ">=10.0.0"
},
"dependencies": {
"ajv": "^6.12.2",
"async": "2.6.1",
Expand Down
3 changes: 1 addition & 2 deletions src/main/js/common/MoneroUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,13 @@ const MoneroError = require("./MoneroError");
*/
class MoneroUtils {


/**
* <p>Get the version of the monero-javascript library.<p>
*
* @return {string} the version of this monero-javascript library
*/
static getVersion() {
return "0.4.5";
return "0.4.6";
}

// TODO: improve validation
Expand Down
5 changes: 4 additions & 1 deletion src/main/js/wallet/MoneroWalletRpc.js
Original file line number Diff line number Diff line change
Expand Up @@ -711,7 +711,10 @@ class MoneroWalletRpc extends MoneroWallet {

// special case: re-fetch txs if inconsistency caused by needing to make multiple rpc calls
for (let tx of txs) {
if (tx.isConfirmed() && tx.getBlock() === undefined) return this.getTxs(query);
if (tx.isConfirmed() && tx.getBlock() === undefined) {
console.error("Inconsistency detected building txs from multiple rpc calls, re-fetching txs");
return this.getTxs(query);
}
}

// order txs if tx hashes given then return
Expand Down
3 changes: 2 additions & 1 deletion src/test/TestDeveloperGuide.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ class TestDeveloperGuide {
it("Test developer guide transaction queries", async function() {

// get a transaction by hash
let tx = await wallet.getTx("9fb2cb7c73743002f131b72874e77b1152891968dc1f2849d3439ace8bae6d8e");
let tx = await wallet.getTx((await wallet.getTxs())[0].getHash()); // REPLACE WITH BELOW FOR MD FILE
//let tx = await wallet.getTx("9fb2cb7c73743002f131b72874e77b1152891968dc1f2849d3439ace8bae6d8e");

// get unconfirmed transactions
let txs = await wallet.getTxs({
Expand Down
2 changes: 1 addition & 1 deletion src/test/TestMoneroDaemonRpc.js
Original file line number Diff line number Diff line change
Expand Up @@ -1745,7 +1745,7 @@ async function getConfirmedTxHashes(daemon) {
let numTxs = 5;
let txHashes = [];
let height = await daemon.getHeight();
while (txHashes.length < numTxs && height >= 0) {
while (txHashes.length < numTxs && height > 0) {
let block = await daemon.getBlockByHeight(--height);
for (let txHash of block.getTxHashes()) txHashes.push(txHash);
}
Expand Down
6 changes: 3 additions & 3 deletions src/test/utils/TestUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,9 +176,9 @@ TestUtils.MAX_FEE = new BigInteger("7500000").multiply(new BigInteger("10000"));
TestUtils.NETWORK_TYPE = MoneroNetworkType.STAGENET;

// default keypair to test
TestUtils.MNEMONIC = "niece cube almost phase zeal ultimate pyramid tapestry hickory bulb bifocals festival always wayside sphere kept upwards wagtail invoke radar pager flippant sensible stunning kept";
TestUtils.ADDRESS = "59dF9pSotECe1Fn4dBGZXWHYyNdo53rbZ7YYseu9jBKCf4c2cUzhuFVRH8HuD4wyaKTqtD3VF3F4eQe3Kzq342F5U8R4jeq";
TestUtils.FIRST_RECEIVE_HEIGHT = 201; // NOTE: this value MUST be the height of the wallet's first tx for tests
TestUtils.MNEMONIC = "limits linen agreed gesture medicate having nurse doing pests tonic nugget pimple anxiety saucepan movement acquire estate likewise exult niece pedantic voyage fuselage gyrate fuselage";
TestUtils.ADDRESS = "54mANzvpzCWQD9FPG9a4XXaRjvQF7uLCxRc6i2uGx9pnQ6nUKaoKZ2oC9kC3Ee6SKBgFLzkwssZ9QH6TeiNGC6CFA99Hnck";
TestUtils.FIRST_RECEIVE_HEIGHT = 8360; // NOTE: this value MUST be the height of the wallet's first tx for tests

// wallet RPC config
TestUtils.WALLET_RPC_CONFIG = {
Expand Down
1 change: 1 addition & 0 deletions todo.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
support startSyncing(refreshRate)
support listener js object
support strings in queries, etc
wallet.waitForTxsToClearPool()?
Expand Down

0 comments on commit a0884bb

Please sign in to comment.