Skip to content

Commit

Permalink
Keep a default node for signTransaction
Browse files Browse the repository at this point in the history
  • Loading branch information
franfernandez20 committed Jul 9, 2024
1 parent 11ece4d commit e878ba1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/lib/dapp/DAppSigner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,13 @@ export class DAppSigner implements Signer {
}

async signTransaction<T extends Transaction>(transaction: T): Promise<T> {
let nodeAccountId: AccountId
if (!transaction.nodeAccountIds || transaction.nodeAccountIds.length === 0)

Check warning on line 178 in src/lib/dapp/DAppSigner.ts

View workflow job for this annotation

GitHub Actions / Coverage annotations (🧪 jest-coverage-report-action)

🌿 Branch is not covered

Warning! Not covered branch

Check warning on line 178 in src/lib/dapp/DAppSigner.ts

View workflow job for this annotation

GitHub Actions / Coverage annotations (🧪 jest-coverage-report-action)

🌿 Branch is not covered

Warning! Not covered branch
nodeAccountId = this._getRandomNodes(1)[0]

Check warning on line 179 in src/lib/dapp/DAppSigner.ts

View workflow job for this annotation

GitHub Actions / Coverage annotations (🧪 jest-coverage-report-action)

🧾 Statement is not covered

Warning! Not covered statement
else nodeAccountId = transaction.nodeAccountIds[0]

Check warning on line 180 in src/lib/dapp/DAppSigner.ts

View workflow job for this annotation

GitHub Actions / Coverage annotations (🧪 jest-coverage-report-action)

🧾 Statement is not covered

Warning! Not covered statement

Check warning on line 180 in src/lib/dapp/DAppSigner.ts

View workflow job for this annotation

GitHub Actions / Coverage annotations (🧪 jest-coverage-report-action)

🧾 Statement is not covered

Warning! Not covered statement

Check warning on line 180 in src/lib/dapp/DAppSigner.ts

View workflow job for this annotation

GitHub Actions / Coverage annotations (🧪 jest-coverage-report-action)

🌿 Branch is not covered

Warning! Not covered branch

Check warning on line 180 in src/lib/dapp/DAppSigner.ts

View workflow job for this annotation

GitHub Actions / Coverage annotations (🧪 jest-coverage-report-action)

🌿 Branch is not covered

Warning! Not covered branch
const transactionBody: proto.TransactionBody = transactionToTransactionBody(
transaction,
transaction.nodeAccountIds[0],
nodeAccountId,

Check warning on line 183 in src/lib/dapp/DAppSigner.ts

View workflow job for this annotation

GitHub Actions / Coverage annotations (🧪 jest-coverage-report-action)

🧾 Statement is not covered

Warning! Not covered statement
)
const transactionBodyBase64 = transactionBodyToBase64String(transactionBody)

Expand Down

0 comments on commit e878ba1

Please sign in to comment.