-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feature/WTCH-97' into 'dev'
[WTCH-97] Add TxSignerFactory Closes WTCH-97 See merge request waves-enterprise/java-sdk/we-node-client!13
- Loading branch information
Showing
3 changed files
with
18 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 0 additions & 15 deletions
15
.../com/wavesenterprise/sdk/tx/signer/node/credentials/ThreadLocalSignCredentialsProvider.kt
This file was deleted.
Oops, something went wrong.
17 changes: 17 additions & 0 deletions
17
...rc/main/kotlin/com/wavesenterprise/sdk/tx/signer/node/factory/TxServiceTxSignerFactory.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package com.wavesenterprise.sdk.tx.signer.node.factory | ||
|
||
import com.wavesenterprise.sdk.node.domain.blocking.tx.TxService | ||
import com.wavesenterprise.sdk.tx.signer.TxSigner | ||
import com.wavesenterprise.sdk.tx.signer.node.TxServiceTxSigner | ||
import com.wavesenterprise.sdk.tx.signer.node.credentials.Credentials | ||
import com.wavesenterprise.sdk.tx.signer.node.credentials.DefaultSignCredentialsProvider | ||
|
||
class TxServiceTxSignerFactory( | ||
private val txService: TxService, | ||
) { | ||
fun withCredentials(credentials: Credentials): TxSigner = | ||
TxServiceTxSigner( | ||
txService = txService, | ||
signCredentialsProvider = DefaultSignCredentialsProvider(credentials), | ||
) | ||
} |