babylonlabs-io / simple-staking

Other
8 stars 10 forks source link

E2E real signed transactions #134

Open gbarkhatov opened 1 month ago

gbarkhatov commented 1 month ago

In the future, we could automatically create a signed transaction based on the utxos, address, and public key we have defined above. This would allow us to potentially change any of those without having to regenerate a valid looking psbt.

This should affect signPsbt and pushTx methods

_Originally posted by @vitsalis in https://github.com/babylonlabs-io/simple-staking/pull/77#discussion_r1745299615_

Additional: https://github.com/babylonlabs-io/simple-staking/pull/77#discussion_r1745300437

gbarkhatov commented 1 month ago

@vitsalis @jrwbabylonlab Since playwrights node and browser environments are different, and we need our wallet to work with bitcoinjs (so as other deps, like BIP32 or BIP39), we will need to bundle the wallet into the JS file:

graph TD
    A[Webpack bundles wallet] --> B[Wallet is bundled as JS file]
    B --> C[Wallet JS file can be consumed]
    C --> D[Wallet JS file is injected into Playwright browser]
    D --> E[Playwright browser executes e2e tests with wallet]
jrwbabylonlab commented 1 month ago

Let’s discuss this on the call. My recommendation is to put this task on hold with lower priority, as there is duplicate work happening with the wallet connector.

jrwbabylonlab commented 1 month ago

Just keeping a note here that we have agreed on the general approach on this issue. i.e use the real dataset for tests but mock on the wallet interaction side.

Hence the above concern https://github.com/babylonlabs-io/simple-staking/issues/134#issuecomment-2363067264 no longer relevant to us