-
Notifications
You must be signed in to change notification settings - Fork 237
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* refactoring categories and amounts + improvements of amounts * clear cache functionality in wallet settings * refactoring of wallet settings * clean up and frontend wallet-refactoring * some documentation about psbt and embit * intermediate commit * moar testing * proper descriptor * updated tests * finalize WalletAwareTxItem Test * coming closer * fix tests * Update src/cryptoadvance/specter/templates/includes/tx-table.html Co-authored-by: Manolis Mandrapilias <70536101+moneymanolis@users.noreply.github.com> * Update src/cryptoadvance/specter/templates/includes/tx-table.html Co-authored-by: Manolis Mandrapilias <70536101+moneymanolis@users.noreply.github.com> * Update src/cryptoadvance/specter/templates/wallet/settings/wallet_settings.jinja Co-authored-by: Manolis Mandrapilias <70536101+moneymanolis@users.noreply.github.com> * Update src/cryptoadvance/specter/templates/wallet/settings/wallet_settings.jinja Co-authored-by: Manolis Mandrapilias <70536101+moneymanolis@users.noreply.github.com> * Update src/cryptoadvance/specter/server_endpoints/wallets/wallets.py Co-authored-by: Manolis Mandrapilias <70536101+moneymanolis@users.noreply.github.com> * fix cypress * refactoring some parts of the psbt-creation-process and wallet.txlist * fix cypress * fix broken csv-download * bugfix confirmations: null * Bugfix: accidental Speed-up-button on confirmed TXs * fix test * fix test (part2) * Liquid specific fixes * improve cache usage * refactoring wallet.check_utxo() * reimplemented the whole check_utxo method Co-authored-by: Manolis Mandrapilias <70536101+moneymanolis@users.noreply.github.com>
- Loading branch information
1 parent
e928113
commit fa9605d
Showing
27 changed files
with
1,648 additions
and
683 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,104 +1,106 @@ | ||
describe('Operating with an elements singlesig wallet', () => { | ||
it('Creates a single sig elements hot wallet', () => { | ||
cy.viewport(1300,660) | ||
cy.visit('/') | ||
cy.get('#node-switch-icon').click() | ||
cy.contains('Elements Node').click() | ||
if (Cypress.env("CI")) { | ||
|
||
it('Creates a single sig elements hot wallet', () => { | ||
cy.viewport(1300,660) | ||
cy.visit('/') | ||
cy.get('#node-switch-icon').click() | ||
cy.contains('Elements Node').click() | ||
|
||
// Delete Wallet if existing | ||
cy.deleteWallet("Elm Single Segwit Hot Wallet") | ||
cy.deleteWallet("Elm Single Nested Hot Wallet") | ||
// Delete Wallet if existing | ||
cy.deleteWallet("Elm Single Segwit Hot Wallet") | ||
cy.deleteWallet("Elm Single Nested Hot Wallet") | ||
|
||
cy.addHotDevice("Hot Elements Device 1","elements") | ||
|
||
// Segwit Wallet | ||
cy.addHotWallet("Elm Single Segwit Hot Wallet","Hot Elements Device 1", "elements", "segwit") | ||
cy.addHotDevice("Hot Elements Device 1","elements") | ||
|
||
// Nested Segwit Wallet | ||
cy.addHotWallet("Elm Single Nested Hot Wallet","Hot Elements Device 1", "elements", "nested_segwit") | ||
}) | ||
// Segwit Wallet | ||
cy.addHotWallet("Elm Single Segwit Hot Wallet","Hot Elements Device 1", "elements", "segwit") | ||
|
||
// Nested Segwit Wallet | ||
cy.addHotWallet("Elm Single Nested Hot Wallet","Hot Elements Device 1", "elements", "nested_segwit") | ||
}) | ||
|
||
it('send confidential transaction from segwit', () => { | ||
cy.viewport(1300,660) | ||
cy.visit('/') | ||
cy.contains("Elm Single Segwit Hot Wallet").click() | ||
it('send confidential transaction from segwit', () => { | ||
cy.viewport(1300,660) | ||
cy.visit('/') | ||
cy.contains("Elm Single Segwit Hot Wallet").click() | ||
|
||
cy.get('#fullbalance_amount').then(($div) => { | ||
const oldBalance = parseFloat($div.text()) | ||
expect(oldBalance).to.be.gte(1.5) | ||
cy.createPsbt("el1qqdsywea5scrn7t9q83fd540pw447h0uae30pdp82rzgkl7yzvjz6gra9ls8qu6sslw4s0ck48we06zhqd6kwjy2quh69zwxwn", "Burn address","1.5") | ||
cy.get('#hot_elements_device_1_tx_sign_btn').click() | ||
cy.get('#hot_elements_device_1_hot_sign_btn').click() | ||
cy.get('#hot_enter_passphrase__submit').click() | ||
cy.get('#broadcast_local_btn').click() | ||
cy.get('#fullbalance_amount', { timeout: Cypress.env("broadcast_timeout") }) | ||
.should(($div) => { | ||
const newBalance = parseFloat($div.text()) | ||
expect(newBalance).to.be.lte(oldBalance - 1.5) | ||
cy.get('#fullbalance_amount').then(($div) => { | ||
const oldBalance = parseFloat($div.text()) | ||
expect(oldBalance).to.be.gte(1.5) | ||
cy.createPsbt("el1qqdsywea5scrn7t9q83fd540pw447h0uae30pdp82rzgkl7yzvjz6gra9ls8qu6sslw4s0ck48we06zhqd6kwjy2quh69zwxwn", "Burn address","1.5") | ||
cy.get('#hot_elements_device_1_tx_sign_btn').click() | ||
cy.get('#hot_elements_device_1_hot_sign_btn').click() | ||
cy.get('#hot_enter_passphrase__submit').click() | ||
cy.get('#broadcast_local_btn').click() | ||
cy.get('#fullbalance_amount', { timeout: Cypress.env("broadcast_timeout") }) | ||
.should(($div) => { | ||
const newBalance = parseFloat($div.text()) | ||
expect(newBalance).to.be.lte(oldBalance - 1.5) | ||
}) | ||
}) | ||
}) | ||
}) | ||
|
||
it('send unconfidential transaction from segwit', () => { | ||
cy.viewport(1300,660) | ||
cy.visit('/') | ||
cy.contains("Elm Single Segwit Hot Wallet").click() | ||
cy.get('#fullbalance_amount').then(($div) => { | ||
const oldBalance = parseFloat($div.text()) | ||
expect(oldBalance).to.be.gte(1.5) | ||
cy.createPsbt("ert1q38la37ulxgc0uwt334he46eua7h8qagqnlm5phcqk7ntgv3x73cqjtr2fa", "Burn address","1.5") | ||
cy.get('#hot_elements_device_1_tx_sign_btn').click() | ||
cy.get('#hot_elements_device_1_hot_sign_btn').click() | ||
cy.get('#hot_enter_passphrase__submit').click() | ||
cy.get('#broadcast_local_btn').click() | ||
cy.get('#fullbalance_amount', { timeout: Cypress.env("broadcast_timeout") }) | ||
.should(($div) => { | ||
const newBalance = parseFloat($div.text()) | ||
expect(newBalance).to.be.lte(oldBalance - 1.5) | ||
it('send unconfidential transaction from segwit', () => { | ||
cy.viewport(1300,660) | ||
cy.visit('/') | ||
cy.contains("Elm Single Segwit Hot Wallet").click() | ||
cy.get('#fullbalance_amount').then(($div) => { | ||
const oldBalance = parseFloat($div.text()) | ||
expect(oldBalance).to.be.gte(1.5) | ||
cy.createPsbt("ert1q38la37ulxgc0uwt334he46eua7h8qagqnlm5phcqk7ntgv3x73cqjtr2fa", "Burn address","1.5") | ||
cy.get('#hot_elements_device_1_tx_sign_btn').click() | ||
cy.get('#hot_elements_device_1_hot_sign_btn').click() | ||
cy.get('#hot_enter_passphrase__submit').click() | ||
cy.get('#broadcast_local_btn').click() | ||
cy.get('#fullbalance_amount', { timeout: Cypress.env("broadcast_timeout") }) | ||
.should(($div) => { | ||
const newBalance = parseFloat($div.text()) | ||
expect(newBalance).to.be.lte(oldBalance - 1.5) | ||
}) | ||
}) | ||
}) | ||
}) | ||
|
||
it('send confidential transaction from nested segwit', () => { | ||
cy.viewport(1300,660) | ||
cy.visit('/') | ||
cy.contains("Elm Single Nested Hot Wallet").click() | ||
it('send confidential transaction from nested segwit', () => { | ||
cy.viewport(1300,660) | ||
cy.visit('/') | ||
cy.contains("Elm Single Nested Hot Wallet").click() | ||
|
||
cy.get('#fullbalance_amount').then(($div) => { | ||
const oldBalance = parseFloat($div.text()) | ||
expect(oldBalance).to.be.gte(1.5) | ||
cy.createPsbt("el1qqdsywea5scrn7t9q83fd540pw447h0uae30pdp82rzgkl7yzvjz6gra9ls8qu6sslw4s0ck48we06zhqd6kwjy2quh69zwxwn", "Burn address","1.5") | ||
cy.get('#hot_elements_device_1_tx_sign_btn').click() | ||
cy.get('#hot_elements_device_1_hot_sign_btn').click() | ||
cy.get('#hot_enter_passphrase__submit').click() | ||
cy.get('#broadcast_local_btn').click() | ||
cy.get('#fullbalance_amount', { timeout: Cypress.env("broadcast_timeout") }) | ||
.should(($div) => { | ||
const newBalance = parseFloat($div.text()) | ||
expect(newBalance).to.be.lte(oldBalance - 1.5) | ||
cy.get('#fullbalance_amount').then(($div) => { | ||
const oldBalance = parseFloat($div.text()) | ||
expect(oldBalance).to.be.gte(1.5) | ||
cy.createPsbt("el1qqdsywea5scrn7t9q83fd540pw447h0uae30pdp82rzgkl7yzvjz6gra9ls8qu6sslw4s0ck48we06zhqd6kwjy2quh69zwxwn", "Burn address","1.5") | ||
cy.get('#hot_elements_device_1_tx_sign_btn').click() | ||
cy.get('#hot_elements_device_1_hot_sign_btn').click() | ||
cy.get('#hot_enter_passphrase__submit').click() | ||
cy.get('#broadcast_local_btn').click() | ||
cy.get('#fullbalance_amount', { timeout: Cypress.env("broadcast_timeout") }) | ||
.should(($div) => { | ||
const newBalance = parseFloat($div.text()) | ||
expect(newBalance).to.be.lte(oldBalance - 1.5) | ||
}) | ||
}) | ||
}) | ||
}) | ||
|
||
it('send unconfidential transaction from nested segwit', () => { | ||
cy.viewport(1300,660) | ||
cy.visit('/') | ||
cy.contains("Elm Single Nested Hot Wallet").click() | ||
cy.get('#fullbalance_amount').then(($div) => { | ||
const oldBalance = parseFloat($div.text()) | ||
expect(oldBalance).to.be.gte(1.5) | ||
cy.createPsbt("ert1q38la37ulxgc0uwt334he46eua7h8qagqnlm5phcqk7ntgv3x73cqjtr2fa", "Burn address","1.5") | ||
cy.get('#hot_elements_device_1_tx_sign_btn').click() | ||
cy.get('#hot_elements_device_1_hot_sign_btn').click() | ||
cy.get('#hot_enter_passphrase__submit').click() | ||
cy.get('#broadcast_local_btn').click() | ||
cy.get('#fullbalance_amount', { timeout: Cypress.env("broadcast_timeout") }) | ||
.should(($div) => { | ||
const newBalance = parseFloat($div.text()) | ||
expect(newBalance).to.be.lte(oldBalance - 1.5) | ||
it('send unconfidential transaction from nested segwit', () => { | ||
cy.viewport(1300,660) | ||
cy.visit('/') | ||
cy.contains("Elm Single Nested Hot Wallet").click() | ||
cy.get('#fullbalance_amount').then(($div) => { | ||
const oldBalance = parseFloat($div.text()) | ||
expect(oldBalance).to.be.gte(1.5) | ||
cy.createPsbt("ert1q38la37ulxgc0uwt334he46eua7h8qagqnlm5phcqk7ntgv3x73cqjtr2fa", "Burn address","1.5") | ||
cy.get('#hot_elements_device_1_tx_sign_btn').click() | ||
cy.get('#hot_elements_device_1_hot_sign_btn').click() | ||
cy.get('#hot_enter_passphrase__submit').click() | ||
cy.get('#broadcast_local_btn').click() | ||
cy.get('#fullbalance_amount', { timeout: Cypress.env("broadcast_timeout") }) | ||
.should(($div) => { | ||
const newBalance = parseFloat($div.text()) | ||
expect(newBalance).to.be.lte(oldBalance - 1.5) | ||
}) | ||
}) | ||
}) | ||
}) | ||
|
||
|
||
} | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.