You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We had a discussion with UniSat about this complex implementation. In general, the tweaked signer should not be used when performing staking transactions because we use the base public key in the timelock script. To unlock the script, the same public key must be used for both signing and verification; otherwise, the transaction will fail on the BTC side.
The current implementation in the PR is correct, as it includes a condition to check if the address is the same as the wallet address before using the tweaked signer. However, this logic should not really reside within the wallet provider. One of the key rules for our provider is that it should function as an “interface exchange,” meaning it should contain minimal business logic.
Here’s what needs to be done or followed up on in this ticket:
1. Follow up with UniSat to see if they can move this logic into their own codebase and expose a parameter for us to use.
2. If the answer is no, add a unit test for this complex method.
3. Add detailed comments explaining each line of the method, as this logic is extremely important.
The text was updated successfully, but these errors were encountered:
Refer to this discussion.
We had a discussion with UniSat about this complex implementation. In general, the tweaked signer should not be used when performing staking transactions because we use the base public key in the timelock script. To unlock the script, the same public key must be used for both signing and verification; otherwise, the transaction will fail on the BTC side.
The current implementation in the PR is correct, as it includes a condition to check if the address is the same as the wallet address before using the tweaked signer. However, this logic should not really reside within the wallet provider. One of the key rules for our provider is that it should function as an “interface exchange,” meaning it should contain minimal business logic.
Here’s what needs to be done or followed up on in this ticket:
1. Follow up with UniSat to see if they can move this logic into their own codebase and expose a parameter for us to use.
2. If the answer is no, add a unit test for this complex method.
3. Add detailed comments explaining each line of the method, as this logic is extremely important.
The text was updated successfully, but these errors were encountered: