From 98aeeb06763c4591528c30cf861d41bd1b79c0c7 Mon Sep 17 00:00:00 2001 From: rooooooooob Date: Mon, 3 May 2021 22:18:47 -0500 Subject: [PATCH 01/18] Data inputs [working] + P2S signing [wip] P2S outputs supported P2S inputs do not seem to work - more testing is needed. Yoroi signs them without returning any errors, but when submitted to the network they are not accepted. --- .../yoroi-ergo-connector/example/index.js | 58 +++++++++++++++---- .../yoroi-ergo-connector/example/package.json | 2 +- .../chrome/extension/background.js | 4 +- .../chrome/extension/ergo-connector/api.js | 31 +++++++++- packages/yoroi-extension/package.json | 4 +- 5 files changed, 83 insertions(+), 16 deletions(-) diff --git a/packages/yoroi-ergo-connector/example/index.js b/packages/yoroi-ergo-connector/example/index.js index 44a6bdb99aa..fa22ee8a3f0 100644 --- a/packages/yoroi-ergo-connector/example/index.js +++ b/packages/yoroi-ergo-connector/example/index.js @@ -56,7 +56,8 @@ function initDapp() { button.textContent = "Send"; button.onclick = async function() { status.innerText = "Creating transaction"; - const donationAddr = "9fp6ERwLEF8u3Jvbii2msogFDUa9edxmvQKbwbwogXjLg7oXZSo"; + const heightGT1337 = "5yE918nbfmCzFGNoh7wz"; // HEIGHT > 1337 + const donationAddr = "9hD2Cw6yQL6zzrw3TFgKdwFkBdDdU3ro1xRFmjouDw4NYS2S5RD"; const creationHeight = 398959; const amountToSend = parseInt(valueEntry.value, 10); const amountToSendBoxValue = wasm.BoxValue.from_i64(wasm.I64.from_str(amountToSend.toString())); @@ -70,7 +71,20 @@ function initDapp() { asset.amount = parseInt(asset.amount); } return utxo; - }) + }); + // this is a box we created with that HEIGHT > 1337 as the ergo tree + utxos.unshift({ + "additionalRegisters": { + }, + "assets": [ + ], + "boxId": "0f0e4c71ccfbe7e749591ef2a906607b415deadee8c23a8d822517c4cd55374e", + "creationHeight": 398959, + "ergoTree": "100104f214d191a37300", + "index": 0, + "transactionId": "c93731f3a79a85f4c959785eb8d981ff0e03730c432dfb07da7049a9b0081027", + "value": 195800 + }); console.log(`utxosValue: ${utxosValue}`); console.log(`${utxosValue} - ${amountToSend} - ${wasm.TxBuilder.SUGGESTED_TX_FEE().as_i64().as_num()}`); const changeValue = utxosValue - amountToSend - wasm.TxBuilder.SUGGESTED_TX_FEE().as_i64().as_num(); @@ -93,7 +107,12 @@ function initDapp() { // changeValueBoxValue, // wasm.Contract.pay_to_address(wasm.Address.from_base58(changeAddr)), // creationHeight); - outputCandidates.add(donationBoxBuilder.build()); + try { + outputCandidates.add(donationBoxBuilder.build()); + } catch (e) { + console.log(`building error: ${e}`); + throw e; + } //outputCandidates.add(changeBoxBuilder.build()); console.log(`utxosval: ${utxosValue}`); const txBuilder = wasm.TxBuilder.new( @@ -104,15 +123,34 @@ function initDapp() { wasm.Address.from_base58(changeAddr), wasm.BoxValue.SAFE_USER_MIN()); //changeValueBoxValue); - + const dataInputs = new wasm.DataInputs(); + // ranndom tx we sent via the connector before - not referenced in any smart contract right now + //dataInputs.add(new wasm.DataInput(wasm.BoxId.from_str("0f0e4c71ccfbe7e749591ef2a906607b415deadee8c23a8d822517c4cd55374e"))); + txBuilder.set_data_inputs(dataInputs); const tx = txBuilder.build().to_json(); - console.log(`tx: ${tx}`); + console.log(`tx: ${JSON.stringify(tx)}`); + console.log(`original id: ${tx.id}`); + // sigma-rust doesn't support most compilation so manually insert it here + // this is HEIGHT > 1337 but in hex and without the checksum/etc for the address of the contract + //tx.outputs[0].ergoTree = "100104f214d191a37300"; + // and we rebuild it using + const correctTx = wasm.UnsignedTransaction.from_json(JSON.stringify(tx)).to_json(); + console.log(`new id: ${correctTx.id}`); + // we must use the exact order chosen as after 0.4.3 in sigma-rust + // this can change and might not use all the utxos as the coin selection + // might choose a more optimal amount + correctTx.inputs = correctTx.inputs.map(box => { +console.log(`box: ${JSON.stringify(box)}`); + const fullBoxInfo = utxos.find(utxo => utxo.boxId === box.boxId); + return { + ...fullBoxInfo, + extension: {} + }; + }); status.innerText = "Awaiting transaction signing"; + console.log(`${JSON.stringify(correctTx)}`); ergo - .sign_tx({ - ...tx, - inputs: utxos.map(utxo => ({ ...utxo, extension: {} })), - }) + .sign_tx(correctTx) .then(async signedTx => { status.innerText = "Transaction signed - awaiting submission" try { @@ -153,4 +191,4 @@ if (typeof ergo_request_read_access === "undefined") { div.appendChild(button); }); initDapp(); -} \ No newline at end of file +} diff --git a/packages/yoroi-ergo-connector/example/package.json b/packages/yoroi-ergo-connector/example/package.json index cbd2fe453f1..db21ee35a26 100644 --- a/packages/yoroi-ergo-connector/example/package.json +++ b/packages/yoroi-ergo-connector/example/package.json @@ -11,7 +11,7 @@ "start": "webpack-dev-server" }, "devDependencies": { - "ergo-lib-wasm-browser": "0.4.3", + "ergo-lib-wasm-browser": "0.10.0", "webpack": "^4.29.3", "webpack-cli": "^3.1.0", "webpack-dev-server": "^3.1.5", diff --git a/packages/yoroi-extension/chrome/extension/background.js b/packages/yoroi-extension/chrome/extension/background.js index 95f52de3595..88e29734f7f 100644 --- a/packages/yoroi-extension/chrome/extension/background.js +++ b/packages/yoroi-extension/chrome/extension/background.js @@ -338,7 +338,9 @@ chrome.runtime.onMessage.addListener(async ( throw new Error('could not get all utxos'); } const utxos = await canGetAllUtxos.getAllUtxos(); - return await connectorSignTx(wallet, password, utxos, tx, indices); + const stateFetcher = await getStateFetcher(localStorageApi); + const bestBlock = await stateFetcher.getBestBlock({ network: wallet.getParent().getNetworkInfo() }); + return await connectorSignTx(wallet, password, utxos, bestBlock, tx, indices); }, db, localStorageApi diff --git a/packages/yoroi-extension/chrome/extension/ergo-connector/api.js b/packages/yoroi-extension/chrome/extension/ergo-connector/api.js index d4d42675cdc..af9f43da497 100644 --- a/packages/yoroi-extension/chrome/extension/ergo-connector/api.js +++ b/packages/yoroi-extension/chrome/extension/ergo-connector/api.js @@ -43,6 +43,8 @@ import { getReceiveAddress } from '../../../app/stores/stateless/addressStores'; import LocalStorageApi from '../../../app/api/localStorage/index'; +import type { BestBlockResponse } from '../../../app/api/ergo/lib/state-fetch/types'; + function paginateResults(results: T[], paginate: ?Paginate): T[] { if (paginate != null) { const startIndex = paginate.page * paginate.limit; @@ -217,9 +219,11 @@ export async function connectorSignTx( publicDeriver: IPublicDeriver, password: string, utxos: any/* IGetAllUtxosResponse */, + bestBlock: BestBlockResponse, tx: Tx, indices: Array ): Promise { + console.log('connectSignTx()'); const withLevels = asHasLevels(publicDeriver); if (withLevels == null) { throw new Error('wallet doesn\'t support levels'); @@ -262,13 +266,36 @@ export async function connectorSignTx( const jsonBoxesToSign = utxosToSign.map(formatUtxoToBox); processBoxesForSigmaRust(jsonBoxesToSign); const txBoxesToSign = RustModule.SigmaRust.ErgoBoxes.from_boxes_json(jsonBoxesToSign); + console.log('data inputs'); + const dataInputs = new RustModule.SigmaRust.DataInputs(); + for (const dataInput of tx.dataInputs) { + const boxId = RustModule.SigmaRust.BoxId.from_str(dataInput.boxId); + dataInputs.add(new RustModule.SigmaRust.DataInput(boxId)); + } + // We could modify the best block backend to return this information for the previous block + // but I'm guessing that votes of the previous block isn't useful for the current one + // and I'm also unsure if any of these 3 would impact signing or not. + // Maybe version would later be used in the ergoscript context? + const headerJson = JSON.stringify({ + version: 2, // TODO: where to get version? (does this impact signing?) + parentId: bestBlock.hash, + timestamp: Date.now(), + nBits: 682315684511744, // TODO: where to get difficulty? (does this impact signing?) + height: bestBlock.height + 1, + votes: "040000", // TODO: where to get votes? (does this impact signing?) + }); + console.log(`block header: ${headerJson}`); + const blockHeader = RustModule.SigmaRust.BlockHeader.from_json(headerJson); + console.log('pre-header'); + const preHeader = RustModule.SigmaRust.PreHeader.from_block_header(blockHeader); + console.log('before signing'); const signedTx = RustModule.SigmaRust.Wallet .from_secrets(wasmKeys) .sign_transaction( - RustModule.SigmaRust.ErgoStateContext.dummy(), // TODO? Not implemented in sigma-rust + new RustModule.SigmaRust.ErgoStateContext(preHeader), wasmTx, txBoxesToSign, - RustModule.SigmaRust.ErgoBoxes.from_boxes_json([]), // TODO: not supported by sigma-rust + RustModule.SigmaRust.ErgoBoxes.from_boxes_json([]), ); return signedTx.to_json(); } diff --git a/packages/yoroi-extension/package.json b/packages/yoroi-extension/package.json index 0ed1c25bff5..e387bde8174 100644 --- a/packages/yoroi-extension/package.json +++ b/packages/yoroi-extension/package.json @@ -102,7 +102,7 @@ "crx": "5.0.1", "css-loader": "5.0.2", "cucumber": "git+https://github.com/SebastienGllmt/cucumber-js.git", - "ergo-lib-wasm-nodejs": "0.7.0", + "ergo-lib-wasm-nodejs": "0.10.0", "eslint": "7.20.0", "eslint-config-airbnb": "18.2.1", "eslint-config-prettier": "7.2.0", @@ -174,7 +174,7 @@ "crypto-browserify": "3.12.0", "crypto-random-string": "3.3.1", "dropbox": "4.0.30", - "ergo-lib-wasm-browser": "0.7.0", + "ergo-lib-wasm-browser": "0.10.0", "es6-error": "4.1.1", "file-saver": "2.0.5", "jdenticon": "3.1.0", From e438936e9a7526684b98e49928f3d22c3e36c94d Mon Sep 17 00:00:00 2001 From: rooooooooob Date: Tue, 4 May 2021 02:19:48 -0500 Subject: [PATCH 02/18] Connector: Add full data inputs to signing ctx --- .../chrome/extension/ergo-connector/api.js | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/packages/yoroi-extension/chrome/extension/ergo-connector/api.js b/packages/yoroi-extension/chrome/extension/ergo-connector/api.js index af9f43da497..5ce257169b7 100644 --- a/packages/yoroi-extension/chrome/extension/ergo-connector/api.js +++ b/packages/yoroi-extension/chrome/extension/ergo-connector/api.js @@ -267,11 +267,15 @@ export async function connectorSignTx( processBoxesForSigmaRust(jsonBoxesToSign); const txBoxesToSign = RustModule.SigmaRust.ErgoBoxes.from_boxes_json(jsonBoxesToSign); console.log('data inputs'); - const dataInputs = new RustModule.SigmaRust.DataInputs(); - for (const dataInput of tx.dataInputs) { - const boxId = RustModule.SigmaRust.BoxId.from_str(dataInput.boxId); - dataInputs.add(new RustModule.SigmaRust.DataInput(boxId)); - } + const dataBoxIds = tx.dataInputs.map(box => box.boxId); + const dataInputs = utxos.filter( + utxo => dataBoxIds.includes(utxo.output.UtxoTransactionOutput.ErgoBoxId) + ).map(formatUtxoToBox); + // const dataInputs = new RustModule.SigmaRust.DataInputs(); + // for (const dataInput of tx.dataInputs) { + // const boxId = RustModule.SigmaRust.BoxId.from_str(dataInput.boxId); + // dataInputs.add(new RustModule.SigmaRust.DataInput(boxId)); + // } // We could modify the best block backend to return this information for the previous block // but I'm guessing that votes of the previous block isn't useful for the current one // and I'm also unsure if any of these 3 would impact signing or not. @@ -295,7 +299,7 @@ export async function connectorSignTx( new RustModule.SigmaRust.ErgoStateContext(preHeader), wasmTx, txBoxesToSign, - RustModule.SigmaRust.ErgoBoxes.from_boxes_json([]), + RustModule.SigmaRust.ErgoBoxes.from_boxes_json(dataInputs), ); return signedTx.to_json(); } From 5342ea736975583d94e88a978a73a5197ebf69c0 Mon Sep 17 00:00:00 2001 From: rooooooooob Date: Wed, 5 May 2021 01:50:50 -0500 Subject: [PATCH 03/18] Connector: P2S input fix We must use the inputs given to us as boxes to sign as even if we arent directly signing them (P2S inputs) they need to be included in the tx signing in sigma-rust. P2S inputs weren't found in the user's UTXOs so they were silently filtered from the signing process unintentionally. We will still need to update this later to get the keys in the same way somehow or find a different way for the cases where it's a UTXO we'd have control to sign over but it hasn't yet been put in our DB (e.g. pending txs which was the reason why we changed UnsignedInputs to include the full data in the first place) --- packages/yoroi-extension/chrome/extension/ergo-connector/api.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/yoroi-extension/chrome/extension/ergo-connector/api.js b/packages/yoroi-extension/chrome/extension/ergo-connector/api.js index 5ce257169b7..3693fdb8651 100644 --- a/packages/yoroi-extension/chrome/extension/ergo-connector/api.js +++ b/packages/yoroi-extension/chrome/extension/ergo-connector/api.js @@ -263,7 +263,7 @@ export async function connectorSignTx( keyLevel: wallet.getParent().getPublicDeriverLevel(), signingKey: finalSigningKey, }); - const jsonBoxesToSign = utxosToSign.map(formatUtxoToBox); + const jsonBoxesToSign = tx.inputs.filter((box, index) => indices.includes(index)); processBoxesForSigmaRust(jsonBoxesToSign); const txBoxesToSign = RustModule.SigmaRust.ErgoBoxes.from_boxes_json(jsonBoxesToSign); console.log('data inputs'); From 74b62eeabf915bf1370d06c403f8cd01ccf1d895 Mon Sep 17 00:00:00 2001 From: Daniel Main Date: Fri, 7 May 2021 12:33:00 +0200 Subject: [PATCH 04/18] buid(yoroi-extension): buld scripts now compatible with Windows --- packages/yoroi-extension/docs/BUILD.md | 6 ++++++ packages/yoroi-extension/docs/SETUP.md | 9 ++++++++- packages/yoroi-extension/package.json | 4 ++++ 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/packages/yoroi-extension/docs/BUILD.md b/packages/yoroi-extension/docs/BUILD.md index 5fb283229c4..9d500282411 100644 --- a/packages/yoroi-extension/docs/BUILD.md +++ b/packages/yoroi-extension/docs/BUILD.md @@ -27,6 +27,12 @@ Example $ npm run prod:stable ``` +#### with byron mainnet (Windows) +```bash +# build files to './build' +$ npm run prod:stable-win +``` + This command will create a full build of the extension in the `./build` directory, which you can also "load unpacked" into your browser, and it will not require you to keep a running process to continue working (standalone build). Note: debug build does not imply that you are connecting to the mainnet. The network picked depends on the `npm` command. diff --git a/packages/yoroi-extension/docs/SETUP.md b/packages/yoroi-extension/docs/SETUP.md index 0f44d4d53cc..b09a82dfb6d 100644 --- a/packages/yoroi-extension/docs/SETUP.md +++ b/packages/yoroi-extension/docs/SETUP.md @@ -1,8 +1,15 @@ # Environment -Tested on Ubuntu 18.04 +Tested on Ubuntu 18.04, Windows 10 # Prerequisites +### Windows 10 +- Node 14 (check [nvm-windows](https://github.com/coreybutler/nvm-windows) +-- ``` nvm install 14 ``` +-- ``` nvm use 14 ``` +- Python 2.7.17 (check [pyenv-win](https://github.com/pyenv-win/pyenv-win)) +-- ``` pyenv install 2.7.17 ``` +-- ``` pyenv global 2.7.17 ``` ### Packages To install other Yoroi-frontend related dependencies use: diff --git a/packages/yoroi-extension/package.json b/packages/yoroi-extension/package.json index d83a4064521..4d78fe491d8 100644 --- a/packages/yoroi-extension/package.json +++ b/packages/yoroi-extension/package.json @@ -6,12 +6,16 @@ "dev:build": "rimraf dev/ && babel-node scripts/build --type=debug", "dev:stable": "npm run dev:build -- --env 'mainnet'", "dev:nightly": "npm run dev:build -- --env 'mainnet' --nightly", + "dev:stable-win": "npm run dev:build -- --env=mainnet", + "dev:nightly-win": "npm run dev:build -- --env=mainnet --nightly", "dev:mock-backend": "babel-node scripts/startWithMockServer.js", "prod:build": "rimraf build/ && NODE_ENV=production babel-node scripts/build --type=prod", "prod:compress": "babel-node ../../scripts/compress", "prod:unsigned": "npm run prod:build -- --env ${CARDANO_NETWORK:-testnet} && npm run prod:compress -- --env ${CARDANO_NETWORK:-testnet} --app-id yoroi-${CARDANO_NETWORK:-testnet} --zip-only --codebase https://yoroiwallet.com/dw/yoroi-${CARDANO_NETWORK:-testnet}-extension.crx", "prod:nightly": "npm run prod:build -- --env 'mainnet' --nightly --ergoConnectorExtensionId=chifollcalpmjdiokipacefnpmbgjnle && npm run -s prod:compress -- --env 'mainnet' --app-id 'yoroi-nightly' --zip-only --codebase 'https://yoroiwallet.com/dw/yoroi-nightly-extension.crx' --key \"'${YOROI_NIGHTLY_PEM:-./nightly-key.pem}'\"", "prod:stable": "npm run prod:build -- --env 'mainnet' && npm run prod:compress -- --env 'mainnet' --app-id 'yoroi' --zip-only --codebase 'https://yoroiwallet.com/dw/yoroi-extension.crx' --key ./production-key.pem", + "prod:nightly-win": "npm run prod:build -- --env=mainnet --nightly --ergoConnectorExtensionId=chifollcalpmjdiokipacefnpmbgjnle && npm run -s prod:compress -- --env=mainnet --app-id=yoroi-nightly --zip-only --codebase=https://yoroiwallet.com/dw/yoroi-nightly-extension.crx --key=\"${YOROI_NIGHTLY_PEM:-./nightly-key.pem}\"", + "prod:stable-win": "npm run prod:build -- --env=mainnet && npm run prod:compress -- --env=mainnet --app-id=yoroi --zip-only --codebase=https://yoroiwallet.com/dw/yoroi-extension.crx --key=./production-key.pem", "keygen": "crx keygen", "clean": "rimraf build/ dev/ *.zip *.crx", "flow": "flow --show-all-errors .", From 316cff933c1baedab0c71a26a3f3bad424836d3c Mon Sep 17 00:00:00 2001 From: Dmitry Usov Date: Wed, 12 May 2021 19:52:08 +0300 Subject: [PATCH 05/18] Remove repeated function --- packages/yoroi-ergo-connector/src/inject.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/packages/yoroi-ergo-connector/src/inject.js b/packages/yoroi-ergo-connector/src/inject.js index bddc44deaef..8d382aaea2e 100644 --- a/packages/yoroi-ergo-connector/src/inject.js +++ b/packages/yoroi-ergo-connector/src/inject.js @@ -60,10 +60,6 @@ class ErgoAPI { return this._ergo_rpc_call("get_utxos", [amount, token_id, paginate]); } - sign_tx(tx) { - return this._ergo_rpc_call("sign_tx", [tx]); - } - get_used_addresses(paginate = undefined) { return this._ergo_rpc_call("get_used_addresses", [paginate]); } From 6889da3913c2094fb898a9d833abfb1a85d2c159 Mon Sep 17 00:00:00 2001 From: vantuz-subhuman Date: Wed, 12 May 2021 22:32:08 +0300 Subject: [PATCH 06/18] Changed date-time string format and pushed the catalyst fund period time one week further --- .gitignore | 1 + .../app/containers/wallet/voting/VotingPage.js | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 9f039af7d74..36136853ee7 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ node_modules npm-debug.log .DS_Store .vscode/ +.idea/ diff --git a/packages/yoroi-extension/app/containers/wallet/voting/VotingPage.js b/packages/yoroi-extension/app/containers/wallet/voting/VotingPage.js index c0d8b39e292..75dd2fdf775 100644 --- a/packages/yoroi-extension/app/containers/wallet/voting/VotingPage.js +++ b/packages/yoroi-extension/app/containers/wallet/voting/VotingPage.js @@ -31,8 +31,8 @@ type Props = {| |}; const roundInfo = { - startDate: new Date(Date.parse('13 May 2021 19:00:00 GMT')), - endDate: new Date(Date.parse('20 May 2021 19:00:00 GMT')), + startDate: new Date(Date.parse('2021-05-203T19:00:00Z')), + endDate: new Date(Date.parse('2021-05-27T19:00:00Z')), nextRound: 4, }; From f89c76f1d0b7124abe477b7d8e4a44c870e3f253 Mon Sep 17 00:00:00 2001 From: vantuz-subhuman Date: Wed, 12 May 2021 22:44:13 +0300 Subject: [PATCH 07/18] Date fix --- .../yoroi-extension/app/containers/wallet/voting/VotingPage.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/yoroi-extension/app/containers/wallet/voting/VotingPage.js b/packages/yoroi-extension/app/containers/wallet/voting/VotingPage.js index 75dd2fdf775..da71f50ba3b 100644 --- a/packages/yoroi-extension/app/containers/wallet/voting/VotingPage.js +++ b/packages/yoroi-extension/app/containers/wallet/voting/VotingPage.js @@ -31,7 +31,7 @@ type Props = {| |}; const roundInfo = { - startDate: new Date(Date.parse('2021-05-203T19:00:00Z')), + startDate: new Date(Date.parse('2021-05-20T19:00:00Z')), endDate: new Date(Date.parse('2021-05-27T19:00:00Z')), nextRound: 4, }; From 91ba6896e885b7efebd02f7b6e7637017bbfd5bf Mon Sep 17 00:00:00 2001 From: Ruslan Dudin Date: Wed, 12 May 2021 23:41:03 +0300 Subject: [PATCH 08/18] Changed nightly build action to use `nightly` branch --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8a069fe28f3..feb12d7f63f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -3,7 +3,7 @@ name: Publish to Nightly on: push: branches: - - develop + - nightly jobs: build: From 25e8aa104cbb43dcdfff743c91aa04120542f992 Mon Sep 17 00:00:00 2001 From: vantuz-subhuman Date: Thu, 13 May 2021 00:16:43 +0300 Subject: [PATCH 09/18] Version bump 4.5.0 --- packages/yoroi-extension/package-lock.json | 2 +- packages/yoroi-extension/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/yoroi-extension/package-lock.json b/packages/yoroi-extension/package-lock.json index 268acad2035..99e7a93a069 100644 --- a/packages/yoroi-extension/package-lock.json +++ b/packages/yoroi-extension/package-lock.json @@ -1,6 +1,6 @@ { "name": "yoroi", - "version": "4.4.1", + "version": "4.5.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/packages/yoroi-extension/package.json b/packages/yoroi-extension/package.json index d83a4064521..ddafcfc89ec 100644 --- a/packages/yoroi-extension/package.json +++ b/packages/yoroi-extension/package.json @@ -1,6 +1,6 @@ { "name": "yoroi", - "version": "4.4.1", + "version": "4.5.0", "description": "Cardano ADA wallet", "scripts": { "dev:build": "rimraf dev/ && babel-node scripts/build --type=debug", From 7e100d2d2ab5348358a6cf3d57edb9258c937e80 Mon Sep 17 00:00:00 2001 From: rooooooooob Date: Mon, 17 May 2021 18:05:32 -0500 Subject: [PATCH 10/18] Cleaning up after testing --- .../yoroi-ergo-connector/example/index.js | 31 ++--- .../example/package-lock.json | 121 ++++++++---------- .../chrome/extension/ergo-connector/api.js | 10 -- packages/yoroi-extension/package-lock.json | 8 +- 4 files changed, 66 insertions(+), 104 deletions(-) diff --git a/packages/yoroi-ergo-connector/example/index.js b/packages/yoroi-ergo-connector/example/index.js index fa22ee8a3f0..382fca201af 100644 --- a/packages/yoroi-ergo-connector/example/index.js +++ b/packages/yoroi-ergo-connector/example/index.js @@ -19,7 +19,7 @@ function initDapp() { // // console.log('}'); // console.log(`get_unused_addresses() = ${JSON.stringify(addresses)}`); // }); - function pagedUsedAddresses(page, limit) { + /*function pagedUsedAddresses(page, limit) { ergo.get_used_addresses({ page, limit }).then(usedAddresses => { console.log(`usedAddresses[${page * limit} - ${page * limit + usedAddresses.length - 1}] = ${JSON.stringify(usedAddresses)}`); pagedUsedAddresses(page + 1, limit); @@ -44,7 +44,7 @@ function initDapp() { }); ergo.get_utxos(5000, assetId).then(result => { console.log(`get_utxos(5000, custom asset) = ${JSON.stringify(result)}`); - }); + });*/ ergo.get_balance().then(async function(result) { let tx = {}; const div = document.getElementById("balance"); @@ -56,14 +56,13 @@ function initDapp() { button.textContent = "Send"; button.onclick = async function() { status.innerText = "Creating transaction"; - const heightGT1337 = "5yE918nbfmCzFGNoh7wz"; // HEIGHT > 1337 const donationAddr = "9hD2Cw6yQL6zzrw3TFgKdwFkBdDdU3ro1xRFmjouDw4NYS2S5RD"; const creationHeight = 398959; const amountToSend = parseInt(valueEntry.value, 10); const amountToSendBoxValue = wasm.BoxValue.from_i64(wasm.I64.from_str(amountToSend.toString())); const rawUtxos = await ergo.get_utxos(amountToSend + wasm.TxBuilder.SUGGESTED_TX_FEE().as_i64().as_num()); let utxosValue = 0; - const utxos = rawUtxos.map(utxo => { + let utxos = rawUtxos.map(utxo => { // need to convert strings to numbers for sigma-rust for now utxo.value = parseInt(utxo.value, 10); utxosValue += utxo.value; @@ -72,19 +71,9 @@ function initDapp() { } return utxo; }); - // this is a box we created with that HEIGHT > 1337 as the ergo tree - utxos.unshift({ - "additionalRegisters": { - }, - "assets": [ - ], - "boxId": "0f0e4c71ccfbe7e749591ef2a906607b415deadee8c23a8d822517c4cd55374e", - "creationHeight": 398959, - "ergoTree": "100104f214d191a37300", - "index": 0, - "transactionId": "c93731f3a79a85f4c959785eb8d981ff0e03730c432dfb07da7049a9b0081027", - "value": 195800 - }); + // Testing with p2S inputs since Yoroi won't return those as they don't belong to anyone's wallet + //while (utxos.length > 1) { utxos.pop(); } + //utxos.unshift({"boxId":"6dd679cc32afd1f56ad74696c7af53c45330148a703da29b3f6b3ca3b09851c3","value":1331719,"ergoTree":"1002040004f2c001d193e4c6b2a573000004047301","assets":[],"additionalRegisters":{},"creationHeight":398959,"transactionId":"d2fbf4b62f262f4bce7973924ae06685aa5ec2313e24716e8b1d86d62789c89b","index":0}); console.log(`utxosValue: ${utxosValue}`); console.log(`${utxosValue} - ${amountToSend} - ${wasm.TxBuilder.SUGGESTED_TX_FEE().as_i64().as_num()}`); const changeValue = utxosValue - amountToSend - wasm.TxBuilder.SUGGESTED_TX_FEE().as_i64().as_num(); @@ -103,10 +92,6 @@ function initDapp() { amountToSendBoxValue, wasm.Contract.pay_to_address(wasm.Address.from_base58(donationAddr)), creationHeight); - // const changeBoxBuilder = new wasm.ErgoBoxCandidateBuilder( - // changeValueBoxValue, - // wasm.Contract.pay_to_address(wasm.Address.from_base58(changeAddr)), - // creationHeight); try { outputCandidates.add(donationBoxBuilder.build()); } catch (e) { @@ -124,7 +109,7 @@ function initDapp() { wasm.BoxValue.SAFE_USER_MIN()); //changeValueBoxValue); const dataInputs = new wasm.DataInputs(); - // ranndom tx we sent via the connector before - not referenced in any smart contract right now + // random tx we sent via the connector before - not referenced in any smart contract right now //dataInputs.add(new wasm.DataInput(wasm.BoxId.from_str("0f0e4c71ccfbe7e749591ef2a906607b415deadee8c23a8d822517c4cd55374e"))); txBuilder.set_data_inputs(dataInputs); const tx = txBuilder.build().to_json(); @@ -133,6 +118,8 @@ function initDapp() { // sigma-rust doesn't support most compilation so manually insert it here // this is HEIGHT > 1337 but in hex and without the checksum/etc for the address of the contract //tx.outputs[0].ergoTree = "100104f214d191a37300"; + // and this is a register-using one + //tx.outputs[0].ergoTree = "1002040004f2c001d193e4c6b2a573000004047301"; // and we rebuild it using const correctTx = wasm.UnsignedTransaction.from_json(JSON.stringify(tx)).to_json(); console.log(`new id: ${correctTx.id}`); diff --git a/packages/yoroi-ergo-connector/example/package-lock.json b/packages/yoroi-ergo-connector/example/package-lock.json index ad2a9601f33..81633cd0a02 100644 --- a/packages/yoroi-ergo-connector/example/package-lock.json +++ b/packages/yoroi-ergo-connector/example/package-lock.json @@ -15,15 +15,15 @@ } }, "@types/minimatch": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.3.tgz", - "integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-1z8k4wzFnNjVK/tlxvrWuK5WMt6mydWWP7+zvH5eFep4oj+UkrfiJTRtjCeBXNpwaA/FYqqtb4/QS4ianFpIRA==", "dev": true }, "@types/node": { - "version": "14.14.31", - "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.31.tgz", - "integrity": "sha512-vFHy/ezP5qI0rFgJ7aQnjDXwAMrG0KqqIH7tQG5PPv3BWBayOPIQNBjVc/P6hhdZfMx51REc6tfDNXHUio893g==", + "version": "15.0.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-15.0.1.tgz", + "integrity": "sha512-TMkXt0Ck1y0KKsGr9gJtWGjttxlZnnvDtphxUOSd0bfaR6Q1jle+sPvrzNR1urqYTWMinoKvjKfXUGsumaO1PA==", "dev": true }, "@webassemblyjs/ast": { @@ -281,9 +281,9 @@ } }, "anymatch": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz", - "integrity": "sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", + "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", "dev": true, "optional": true, "requires": { @@ -423,9 +423,9 @@ "dev": true }, "balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true }, "base": { @@ -854,9 +854,9 @@ } }, "glob-parent": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz", - "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", "dev": true, "optional": true, "requires": { @@ -889,13 +889,10 @@ "dev": true }, "chrome-trace-event": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.2.tgz", - "integrity": "sha512-9e/zx1jw7B4CO+c/RXoCsfg/x1AfUBioy4owYH0bJprEYAx5hRFLRhWBqHAG57D0ZM4H7vxbP7bPe0VwhQRYDQ==", - "dev": true, - "requires": { - "tslib": "^1.9.0" - } + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz", + "integrity": "sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==", + "dev": true }, "cipher-base": { "version": "1.0.4", @@ -1362,9 +1359,9 @@ "dev": true }, "detect-node": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/detect-node/-/detect-node-2.0.4.tgz", - "integrity": "sha512-ZIzRpLJrOj7jjP2miAtgqIfmzbxa4ZOr5jJc601zklsfEx9oTzmmj2nVpIPRpNlRTIh8lc1kyViIY7BWSGNmKw==", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/detect-node/-/detect-node-2.0.5.tgz", + "integrity": "sha512-qi86tE6hRcFHy8jI1m2VG+LaPUR1LhqDa5G8tVjuUXmOrpuAgqsA1pN0+ldgr3aKUH+QLI9hCY/OcRYisERejw==", "dev": true }, "diffie-hellman": { @@ -1518,9 +1515,7 @@ } }, "ergo-lib-wasm-browser": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/ergo-lib-wasm-browser/-/ergo-lib-wasm-browser-0.4.3.tgz", - "integrity": "sha512-YzsLFP/Bbg/0UWUyFRlOmGOEJD9VIZD06GE4TtBg4bpoyMy0f8OrQlvvaR6l1mPXqPfiMwydh4hHkp0Xdicq6w==", + "version": "file:../../../../sigma-rust/bindings/ergo-lib-wasm/pkg", "dev": true }, "errno": { @@ -1596,9 +1591,9 @@ "dev": true }, "eventsource": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/eventsource/-/eventsource-1.0.7.tgz", - "integrity": "sha512-4Ln17+vVT0k8aWq+t/bF5arcS3EpT9gYtW66EPacdj/mAFevznsnyoHLPy2BA8gbIQeIHoPsvwmfBftfcG//BQ==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/eventsource/-/eventsource-1.1.0.tgz", + "integrity": "sha512-VSJjT5oCNrFvCS6igjzPAt5hBzQ2qPBFIbJ03zLI9SE0mxwZpMw6BfJrbFHm1a141AavMEB8JHmBhWAd66PfCg==", "dev": true, "requires": { "original": "^1.0.0" @@ -1913,9 +1908,9 @@ } }, "follow-redirects": { - "version": "1.13.3", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.13.3.tgz", - "integrity": "sha512-DUgl6+HDzB0iEptNQEXLx/KhTmDb8tZUHSeLqpnjpknR70H0nC2t9N73BK6fN4hOvJ84pKlIQVQ4k5FFlBedKA==", + "version": "1.14.0", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.0.tgz", + "integrity": "sha512-0vRwd7RKQBTt+mgu87mtYeofLFZpTas2S9zY+jIeuLJMNvudIgF52nr19q40HOwH5RrhWIPuj9puybzSJiRrVg==", "dev": true }, "for-in": { @@ -2839,18 +2834,18 @@ "dev": true }, "mime-db": { - "version": "1.46.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.46.0.tgz", - "integrity": "sha512-svXaP8UQRZ5K7or+ZmfNhg2xX3yKDMUzqadsSqi4NCH/KomcH75MAMYAGVlvXn4+b/xOPhS3I2uHKRUzvjY7BQ==", + "version": "1.47.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.47.0.tgz", + "integrity": "sha512-QBmA/G2y+IfeS4oktet3qRZ+P5kPhCKRXxXnQEudYqUaEioAU1/Lq2us3D/t1Jfo4hE9REQPrbB7K5sOczJVIw==", "dev": true }, "mime-types": { - "version": "2.1.29", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.29.tgz", - "integrity": "sha512-Y/jMt/S5sR9OaqteJtslsFZKWOIIqMACsJSiHghlCAyhf7jfVYjKBmLiX8OgpWeW+fjJ2b+Az69aPFPkUOY6xQ==", + "version": "2.1.30", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.30.tgz", + "integrity": "sha512-crmjA4bLtR8m9qLpHvgxSChT+XoSlZi8J4n/aIdn3z92e/U47Z0V/yl+Wh9W046GgFVAmoNR/fmdbZYcSSIUeg==", "dev": true, "requires": { - "mime-db": "1.46.0" + "mime-db": "1.47.0" } }, "minimalistic-assert": { @@ -3339,9 +3334,9 @@ } }, "pbkdf2": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.1.tgz", - "integrity": "sha512-4Ejy1OPxi9f2tt1rRV7Go7zmfDQ+ZectEQz3VGUQhgq62HtIRPDyG/JtnwIxs6x3uNMwo2V7q1fMvKjb+Tnpqg==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.2.tgz", + "integrity": "sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA==", "dev": true, "requires": { "create-hash": "^1.1.2", @@ -3352,9 +3347,9 @@ } }, "picomatch": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz", - "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==", + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.3.tgz", + "integrity": "sha512-KpELjfwcCDUb9PeigTs2mBJzXUPzAuP2oPcA989He8Rte0+YUAjw1JVedDhuTKPkHjSYzMN3npC9luThGYEKdg==", "dev": true, "optional": true }, @@ -3638,9 +3633,9 @@ "dev": true }, "repeat-element": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.3.tgz", - "integrity": "sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.4.tgz", + "integrity": "sha512-LFiNfRcSu7KK3evMyYOuCzv3L10TW7yC1G2/+StMjK8Y6Vqd2MG7r/Qjw4ghtuCOjFvlnms/iMmLqpvW/ES/WQ==", "dev": true }, "repeat-string": { @@ -4092,9 +4087,9 @@ } }, "sockjs-client": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/sockjs-client/-/sockjs-client-1.5.0.tgz", - "integrity": "sha512-8Dt3BDi4FYNrCFGTL/HtwVzkARrENdwOUf1ZoW/9p3M8lZdFT35jVdrHza+qgxuG9H3/shR4cuX/X9umUrjP8Q==", + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/sockjs-client/-/sockjs-client-1.5.1.tgz", + "integrity": "sha512-VnVAb663fosipI/m6pqRXakEOw7nvd7TUgdr3PlR/8V2I95QIdwT8L4nMxhyU8SmDBHYXU1TOElaKOmKLfYzeQ==", "dev": true, "requires": { "debug": "^3.2.6", @@ -4102,7 +4097,7 @@ "faye-websocket": "^0.11.3", "inherits": "^2.0.4", "json3": "^3.3.3", - "url-parse": "^1.4.7" + "url-parse": "^1.5.1" }, "dependencies": { "debug": { @@ -4253,9 +4248,9 @@ } }, "ssri": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/ssri/-/ssri-6.0.1.tgz", - "integrity": "sha512-3Wge10hNcT1Kur4PDFwEieXSCMCJs/7WvSACcrMYrNp+b8kDL1/0wJch5Ni2WrtwEa2IO8OsVfeKIciKCDx/QA==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-6.0.2.tgz", + "integrity": "sha512-cepbSq/neFK7xB6A50KHN0xHDotYzq58wWCa5LeWqnPrHG8GzfEjO/4O8kpmcGW+oaxkvhEJCWgbgNk4/ZV93Q==", "dev": true, "requires": { "figgy-pudding": "^3.5.1" @@ -4500,12 +4495,6 @@ "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==", "dev": true }, - "tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true - }, "tty-browserify": { "version": "0.0.0", "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz", @@ -5151,9 +5140,9 @@ "dev": true }, "y18n": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.1.tgz", - "integrity": "sha512-wNcy4NvjMYL8gogWWYAO7ZFWFfHcbdbE57tZO8e4cbpj8tfUcwrwqSl3ad8HxpYWCdXcJUCeKKZS62Av1affwQ==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", + "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", "dev": true }, "yallist": { diff --git a/packages/yoroi-extension/chrome/extension/ergo-connector/api.js b/packages/yoroi-extension/chrome/extension/ergo-connector/api.js index 3693fdb8651..9c175844cb2 100644 --- a/packages/yoroi-extension/chrome/extension/ergo-connector/api.js +++ b/packages/yoroi-extension/chrome/extension/ergo-connector/api.js @@ -223,7 +223,6 @@ export async function connectorSignTx( tx: Tx, indices: Array ): Promise { - console.log('connectSignTx()'); const withLevels = asHasLevels(publicDeriver); if (withLevels == null) { throw new Error('wallet doesn\'t support levels'); @@ -266,16 +265,10 @@ export async function connectorSignTx( const jsonBoxesToSign = tx.inputs.filter((box, index) => indices.includes(index)); processBoxesForSigmaRust(jsonBoxesToSign); const txBoxesToSign = RustModule.SigmaRust.ErgoBoxes.from_boxes_json(jsonBoxesToSign); - console.log('data inputs'); const dataBoxIds = tx.dataInputs.map(box => box.boxId); const dataInputs = utxos.filter( utxo => dataBoxIds.includes(utxo.output.UtxoTransactionOutput.ErgoBoxId) ).map(formatUtxoToBox); - // const dataInputs = new RustModule.SigmaRust.DataInputs(); - // for (const dataInput of tx.dataInputs) { - // const boxId = RustModule.SigmaRust.BoxId.from_str(dataInput.boxId); - // dataInputs.add(new RustModule.SigmaRust.DataInput(boxId)); - // } // We could modify the best block backend to return this information for the previous block // but I'm guessing that votes of the previous block isn't useful for the current one // and I'm also unsure if any of these 3 would impact signing or not. @@ -288,11 +281,8 @@ export async function connectorSignTx( height: bestBlock.height + 1, votes: "040000", // TODO: where to get votes? (does this impact signing?) }); - console.log(`block header: ${headerJson}`); const blockHeader = RustModule.SigmaRust.BlockHeader.from_json(headerJson); - console.log('pre-header'); const preHeader = RustModule.SigmaRust.PreHeader.from_block_header(blockHeader); - console.log('before signing'); const signedTx = RustModule.SigmaRust.Wallet .from_secrets(wasmKeys) .sign_transaction( diff --git a/packages/yoroi-extension/package-lock.json b/packages/yoroi-extension/package-lock.json index b425db8bff1..82bcca027bd 100644 --- a/packages/yoroi-extension/package-lock.json +++ b/packages/yoroi-extension/package-lock.json @@ -17325,14 +17325,10 @@ "dev": true }, "ergo-lib-wasm-browser": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/ergo-lib-wasm-browser/-/ergo-lib-wasm-browser-0.7.0.tgz", - "integrity": "sha512-SmuvzrmuUY0Ajm01aluTq+z3EdAnu+TjPWQaBZthsiVxnKUnGvzeFzzKQ58y4rBKMWaCqjojV9ZKYtCq9++CXQ==" + "version": "0.10.0" }, "ergo-lib-wasm-nodejs": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/ergo-lib-wasm-nodejs/-/ergo-lib-wasm-nodejs-0.7.0.tgz", - "integrity": "sha512-sXohlP79gx+njXXVC5q/v4iA7Kctmcw+Y+khOZhFrgGA8gG9cLCO2M9sq3PkcR2WHj7sbEAOKEokriO72IJptg==", + "version": "0.10.0", "dev": true }, "errno": { From 8f17d5a493cbba40d025974dabcbd75024b37d9f Mon Sep 17 00:00:00 2001 From: vantuz-subhuman Date: Thu, 20 May 2021 11:19:41 +0300 Subject: [PATCH 11/18] Pushed Catalyst fund4 dates to May 26th, hopefully the final real date --- .../app/containers/wallet/voting/VotingPage.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/yoroi-extension/app/containers/wallet/voting/VotingPage.js b/packages/yoroi-extension/app/containers/wallet/voting/VotingPage.js index da71f50ba3b..ab1cbc598cd 100644 --- a/packages/yoroi-extension/app/containers/wallet/voting/VotingPage.js +++ b/packages/yoroi-extension/app/containers/wallet/voting/VotingPage.js @@ -31,8 +31,8 @@ type Props = {| |}; const roundInfo = { - startDate: new Date(Date.parse('2021-05-20T19:00:00Z')), - endDate: new Date(Date.parse('2021-05-27T19:00:00Z')), + startDate: new Date(Date.parse('2021-05-26T19:00:00Z')), + endDate: new Date(Date.parse('2021-06-02T19:00:00Z')), nextRound: 4, }; From d64504ad815daf15ee64ac82ee51637c61e53322 Mon Sep 17 00:00:00 2001 From: vantuz-subhuman Date: Thu, 20 May 2021 11:25:06 +0300 Subject: [PATCH 12/18] Version bump 4.5.1 --- packages/yoroi-extension/package-lock.json | 2 +- packages/yoroi-extension/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/yoroi-extension/package-lock.json b/packages/yoroi-extension/package-lock.json index 99e7a93a069..d8e2baa69c3 100644 --- a/packages/yoroi-extension/package-lock.json +++ b/packages/yoroi-extension/package-lock.json @@ -1,6 +1,6 @@ { "name": "yoroi", - "version": "4.5.0", + "version": "4.5.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/packages/yoroi-extension/package.json b/packages/yoroi-extension/package.json index ddafcfc89ec..4c4daeb550c 100644 --- a/packages/yoroi-extension/package.json +++ b/packages/yoroi-extension/package.json @@ -1,6 +1,6 @@ { "name": "yoroi", - "version": "4.5.0", + "version": "4.5.1", "description": "Cardano ADA wallet", "scripts": { "dev:build": "rimraf dev/ && babel-node scripts/build --type=debug", From c0c38f5824d4bdaa20ab191bab532528d0d2e29c Mon Sep 17 00:00:00 2001 From: vantuz-subhuman Date: Fri, 21 May 2021 15:37:36 +0300 Subject: [PATCH 13/18] Ergo Connector Version bump 0.4.0 --- packages/yoroi-ergo-connector/package-lock.json | 2 +- packages/yoroi-ergo-connector/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/yoroi-ergo-connector/package-lock.json b/packages/yoroi-ergo-connector/package-lock.json index cf4268f9126..c974652c693 100644 --- a/packages/yoroi-ergo-connector/package-lock.json +++ b/packages/yoroi-ergo-connector/package-lock.json @@ -1,6 +1,6 @@ { "name": "yoroi-ergo-connector", - "version": "0.2.1", + "version": "0.4.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/packages/yoroi-ergo-connector/package.json b/packages/yoroi-ergo-connector/package.json index 4348ab8ffc9..49627abab08 100644 --- a/packages/yoroi-ergo-connector/package.json +++ b/packages/yoroi-ergo-connector/package.json @@ -1,6 +1,6 @@ { "name": "yoroi-ergo-connector", - "version": "0.3.0", + "version": "0.4.0", "description": "", "scripts": { "keygen": "crx keygen", From 37c955744bf817b8bba9d2cbc04ff63c8939b35b Mon Sep 17 00:00:00 2001 From: vantuz-subhuman Date: Wed, 26 May 2021 19:12:28 +0300 Subject: [PATCH 14/18] Catalyst Fund 4 dates push --- .../app/containers/wallet/voting/VotingPage.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/yoroi-extension/app/containers/wallet/voting/VotingPage.js b/packages/yoroi-extension/app/containers/wallet/voting/VotingPage.js index ab1cbc598cd..9a184d1f745 100644 --- a/packages/yoroi-extension/app/containers/wallet/voting/VotingPage.js +++ b/packages/yoroi-extension/app/containers/wallet/voting/VotingPage.js @@ -31,8 +31,8 @@ type Props = {| |}; const roundInfo = { - startDate: new Date(Date.parse('2021-05-26T19:00:00Z')), - endDate: new Date(Date.parse('2021-06-02T19:00:00Z')), + startDate: new Date(Date.parse('2021-06-02T19:00:00Z')), + endDate: new Date(Date.parse('2021-06-09T19:00:00Z')), nextRound: 4, }; From 1925e92970a19de7457b9499d0061c36e8515929 Mon Sep 17 00:00:00 2001 From: vantuz-subhuman Date: Wed, 26 May 2021 19:32:16 +0300 Subject: [PATCH 15/18] Verison bump 4.5.2 --- packages/yoroi-extension/package-lock.json | 8 ++++++-- packages/yoroi-extension/package.json | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/packages/yoroi-extension/package-lock.json b/packages/yoroi-extension/package-lock.json index bbc01b65511..986630faf4b 100644 --- a/packages/yoroi-extension/package-lock.json +++ b/packages/yoroi-extension/package-lock.json @@ -1,6 +1,6 @@ { "name": "yoroi", - "version": "4.5.1", + "version": "4.5.2", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -17344,10 +17344,14 @@ "dev": true }, "ergo-lib-wasm-browser": { - "version": "0.10.0" + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/ergo-lib-wasm-browser/-/ergo-lib-wasm-browser-0.10.0.tgz", + "integrity": "sha512-kZerrt+2wdGJMLF2FCabE1JTOLXkeYXqYSN7+5oq+6vWMsG1OSWQdBJfbKteWDPk/l6uXFxKXvwaR+LCH1rRlQ==" }, "ergo-lib-wasm-nodejs": { "version": "0.10.0", + "resolved": "https://registry.npmjs.org/ergo-lib-wasm-nodejs/-/ergo-lib-wasm-nodejs-0.10.0.tgz", + "integrity": "sha512-V8CPSrzyCoclaeQmx0nQb8/hc2hgFYBoimlEg83TYlPcmFYsM/8fNSQdtlpS3jg2Vk09iOfCVaeoRuimzxJGvg==", "dev": true }, "errno": { diff --git a/packages/yoroi-extension/package.json b/packages/yoroi-extension/package.json index c4647349059..aba94a6a053 100644 --- a/packages/yoroi-extension/package.json +++ b/packages/yoroi-extension/package.json @@ -1,6 +1,6 @@ { "name": "yoroi", - "version": "4.5.1", + "version": "4.5.2", "description": "Cardano ADA wallet", "scripts": { "dev:build": "rimraf dev/ && babel-node scripts/build --type=debug", From fc644c6abdeb41f5b2779627074279be2eb0f01f Mon Sep 17 00:00:00 2001 From: vantuz-subhuman Date: Wed, 26 May 2021 19:12:28 +0300 Subject: [PATCH 16/18] Catalyst Fund 4 dates push (cherry picked from commit 37c955744bf817b8bba9d2cbc04ff63c8939b35b) --- .../app/containers/wallet/voting/VotingPage.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/yoroi-extension/app/containers/wallet/voting/VotingPage.js b/packages/yoroi-extension/app/containers/wallet/voting/VotingPage.js index ab1cbc598cd..9a184d1f745 100644 --- a/packages/yoroi-extension/app/containers/wallet/voting/VotingPage.js +++ b/packages/yoroi-extension/app/containers/wallet/voting/VotingPage.js @@ -31,8 +31,8 @@ type Props = {| |}; const roundInfo = { - startDate: new Date(Date.parse('2021-05-26T19:00:00Z')), - endDate: new Date(Date.parse('2021-06-02T19:00:00Z')), + startDate: new Date(Date.parse('2021-06-02T19:00:00Z')), + endDate: new Date(Date.parse('2021-06-09T19:00:00Z')), nextRound: 4, }; From a0f8ced1c9177870172946078f757d307f6b24d0 Mon Sep 17 00:00:00 2001 From: vantuz-subhuman Date: Thu, 27 May 2021 12:05:14 +0300 Subject: [PATCH 17/18] Verison bump 4.5.3 --- packages/yoroi-extension/package-lock.json | 2 +- packages/yoroi-extension/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/yoroi-extension/package-lock.json b/packages/yoroi-extension/package-lock.json index d8e2baa69c3..0a7ee4179c6 100644 --- a/packages/yoroi-extension/package-lock.json +++ b/packages/yoroi-extension/package-lock.json @@ -1,6 +1,6 @@ { "name": "yoroi", - "version": "4.5.1", + "version": "4.5.3", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/packages/yoroi-extension/package.json b/packages/yoroi-extension/package.json index 4c4daeb550c..c4e10c464a8 100644 --- a/packages/yoroi-extension/package.json +++ b/packages/yoroi-extension/package.json @@ -1,6 +1,6 @@ { "name": "yoroi", - "version": "4.5.1", + "version": "4.5.3", "description": "Cardano ADA wallet", "scripts": { "dev:build": "rimraf dev/ && babel-node scripts/build --type=debug", From e88b56043450049d522b4e26462a45647660dc95 Mon Sep 17 00:00:00 2001 From: vantuz-subhuman Date: Thu, 27 May 2021 12:38:27 +0300 Subject: [PATCH 18/18] Package-lock update --- packages/yoroi-extension/package-lock.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/yoroi-extension/package-lock.json b/packages/yoroi-extension/package-lock.json index 0a7ee4179c6..dbefd2d366e 100644 --- a/packages/yoroi-extension/package-lock.json +++ b/packages/yoroi-extension/package-lock.json @@ -17344,14 +17344,14 @@ "dev": true }, "ergo-lib-wasm-browser": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/ergo-lib-wasm-browser/-/ergo-lib-wasm-browser-0.7.0.tgz", - "integrity": "sha512-SmuvzrmuUY0Ajm01aluTq+z3EdAnu+TjPWQaBZthsiVxnKUnGvzeFzzKQ58y4rBKMWaCqjojV9ZKYtCq9++CXQ==" + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/ergo-lib-wasm-browser/-/ergo-lib-wasm-browser-0.10.0.tgz", + "integrity": "sha512-kZerrt+2wdGJMLF2FCabE1JTOLXkeYXqYSN7+5oq+6vWMsG1OSWQdBJfbKteWDPk/l6uXFxKXvwaR+LCH1rRlQ==" }, "ergo-lib-wasm-nodejs": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/ergo-lib-wasm-nodejs/-/ergo-lib-wasm-nodejs-0.7.0.tgz", - "integrity": "sha512-sXohlP79gx+njXXVC5q/v4iA7Kctmcw+Y+khOZhFrgGA8gG9cLCO2M9sq3PkcR2WHj7sbEAOKEokriO72IJptg==", + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/ergo-lib-wasm-nodejs/-/ergo-lib-wasm-nodejs-0.10.0.tgz", + "integrity": "sha512-V8CPSrzyCoclaeQmx0nQb8/hc2hgFYBoimlEg83TYlPcmFYsM/8fNSQdtlpS3jg2Vk09iOfCVaeoRuimzxJGvg==", "dev": true }, "errno": {