Updated on 2026-08-14
This commit is contained in:
commit
df076f15aa
1 changed files with 7 additions and 2 deletions
|
|
@ -172,10 +172,15 @@ internal class DefaultTransactionRepository(
|
||||||
): TransactionData.Uncompiled = withContext(coroutineDispatcherProvider.io) {
|
): TransactionData.Uncompiled = withContext(coroutineDispatcherProvider.io) {
|
||||||
val blockchain = Blockchain.fromId(network.id.value)
|
val blockchain = Blockchain.fromId(network.id.value)
|
||||||
|
|
||||||
|
// For now transfer one nft asset at a time
|
||||||
|
val updatedNFTAsset = nftAsset.copy(
|
||||||
|
amount = BigInteger.ONE,
|
||||||
|
)
|
||||||
|
|
||||||
val nftTransferCallData = SmartContractCallDataProviderFactory.getNFTTransferCallData(
|
val nftTransferCallData = SmartContractCallDataProviderFactory.getNFTTransferCallData(
|
||||||
destinationAddress = destinationAddress,
|
destinationAddress = destinationAddress,
|
||||||
ownerAddress = ownerAddress,
|
ownerAddress = ownerAddress,
|
||||||
nftAsset = nftAsset,
|
nftAsset = updatedNFTAsset,
|
||||||
blockchain = blockchain,
|
blockchain = blockchain,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -199,7 +204,7 @@ internal class DefaultTransactionRepository(
|
||||||
|
|
||||||
return@withContext createTransaction(
|
return@withContext createTransaction(
|
||||||
amount = Amount(
|
amount = Amount(
|
||||||
value = nftAsset.amount?.toBigDecimal() ?: error("Invalid amount"),
|
value = updatedNFTAsset.amount?.toBigDecimal() ?: error("Invalid amount"),
|
||||||
token = Token(
|
token = Token(
|
||||||
symbol = blockchain.currency,
|
symbol = blockchain.currency,
|
||||||
contractAddress = contractAddress,
|
contractAddress = contractAddress,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue