Open teacoat opened 1 month ago
St.:grey_question: |
Category | Percentage | Covered / Total |
---|---|---|---|
π΄ | Statements | 45.26% (-0.24% π») |
258/570 |
π΄ | Branches | 25.14% (-0.59% π») |
44/175 |
π΄ | Functions | 27.34% | 38/139 |
π΄ | Lines | 45.4% (-0.26% π») |
242/533 |
25 tests passing in 2 suites.
Report generated by π§ͺjest coverage report action from ed364dc52a131fe2cef9cb952ce4abfb4aa86ce4
It is possible the entire signing function here is wrong, I will do some more testing on this as its quite different to what we are doing in hashconnect
Maybe we can use an approach similar to this function: keep setting the nodes if the transaction does not have any set, and use the node from the transaction if it does.
/**
* Sets default consensus nodes that a transaction will be submitted to. Node Account ID(s)
* must be set before a transaction can be frozen. If they have already been set, this
* function will not modify the transaction.
* @param transaction - any instance of a class that extends `Transaction`
*
* @see {@link https://docs.hedera.com/hedera/networks/testnet/testnet-nodes | Full list of Testnet-nodes}
* @see {@link https://docs.hedera.com/hedera/networks/mainnet/mainnet-nodes | Full list of Mainnet-nodes}
*/
export function setDefaultNodeAccountIds<T extends Transaction>(transaction: T): void {
const isNodeAccountIdNotSet =
!transaction.nodeAccountIds || transaction.nodeAccountIds.length === 0
if (!transaction.isFrozen() && isNodeAccountIdNotSet)
transaction.setNodeAccountIds([new AccountId(3), new AccountId(4), new AccountId(5)])
}
thanks guys,trule appreciated!
When working with HSuite they were encountering issues with signing transactions, this is the change we applied to hashconnect in order to fix the issue. When signing a transaction multiple times (multisig), you want to preserve the node id.
May resolve this: https://github.com/hashgraph/hedera-wallet-connect/issues/124