Skip to content

Commit

Permalink
fix: refactored code
Browse files Browse the repository at this point in the history
  • Loading branch information
HashEngineering committed Jan 11, 2024
1 parent 820b3c5 commit 33859a5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions wallet/src/de/schildbach/wallet/ui/dashpay/PlatformRepo.kt
Original file line number Diff line number Diff line change
Expand Up @@ -570,9 +570,9 @@ class PlatformRepo @Inject constructor(
//TODO: remove when iOS uses big endian
if (cftxData == null)
cftxData = platform.client.getTransaction(Sha256Hash.wrap(invite.cftx).reversedBytes.toHex())
val cftx = AssetLockTransaction(platform.params, cftxData!!.transaction)
val assetLockTx = AssetLockTransaction(platform.params, cftxData!!.transaction)
val privateKey = DumpedPrivateKey.fromBase58(platform.params, invite.privateKey).key
cftx.addAssetLockPublicKey(privateKey)
assetLockTx.addAssetLockPublicKey(privateKey)

// TODO: when all instantsend locks are deterministic, we don't need the catch block
val instantSendLock = try {
Expand All @@ -581,8 +581,8 @@ class PlatformRepo @Inject constructor(
InstantSendLock(platform.params, Utils.HEX.decode(invite.instantSendLock), InstantSendLock.ISLOCK_VERSION)
}

cftx.confidence.setInstantSendLock(instantSendLock)
blockchainIdentity.initializeAssetLockTransaction(cftx)
assetLockTx.confidence.setInstantSendLock(instantSendLock)
blockchainIdentity.initializeAssetLockTransaction(assetLockTx)
}
}

Expand Down

0 comments on commit 33859a5

Please sign in to comment.