emit "transactionReceived" event later, when the wallet state might be more accurate
new MessageListener class to test wallet onMessage
I also moved before / beforeEach methonds inside describe to avoid executing them before all tests. They were interfearing and breaking electrum connection.
Before
Storage before
Transaction before
Wallet before
Boost
Boost beforeEach
✔ Should fail in some cases. (2664ms)
Boost beforeEach
✔ Should generate CPFP for send transaction (2128ms)
Boost beforeEach
✔ Should generate RBF for send transaction (1967ms)
Electrum Methods
Boost beforeEach
✔ connectToElectrum: Should connect to a random Electrum server (291ms)
Boost beforeEach
✔ isConnected: Should return true if connected to an Electrum server (47ms)
Boost beforeEach
✔ getAddressBalance: Should return the balance (in sats) of the provided address (314ms)
Boost beforeEach
✔ getNextAvailableAddress: Should return the next available address/change index and the last used address/change index (576ms)
Boost beforeEach
✔ Should return available UTXO's (3340ms)
...
After:
Boost
Boost beforeEach
✔ Should fail in some cases. (2698ms)
Boost beforeEach
✔ Should generate CPFP for send transaction (2124ms)
Boost beforeEach
✔ Should generate RBF for send transaction (2105ms)
Electrum Methods
Electrum before
✔ connectToElectrum: Should connect to a random Electrum server (299ms)
✔ isConnected: Should return true if connected to an Electrum server (295ms)
✔ getAddressBalance: Should return the balance (in sats) of the provided address (307ms)
✔ getNextAvailableAddress: Should return the next available address/change index and the last used address/change index (748ms)
✔ Should return available UTXO's (3794ms)
Depends on #84
onMessage
I also moved
before
/beforeEach
methonds insidedescribe
to avoid executing them before all tests. They were interfearing and breaking electrum connection.Before
After: