diff --git a/centrifuge-app/src/pages/NavManagement/NavManagementAssetTable.tsx b/centrifuge-app/src/pages/NavManagement/NavManagementAssetTable.tsx index 7468745b8..e92dab612 100644 --- a/centrifuge-app/src/pages/NavManagement/NavManagementAssetTable.tsx +++ b/centrifuge-app/src/pages/NavManagement/NavManagementAssetTable.tsx @@ -200,7 +200,7 @@ export function NavManagementAssetTable({ poolId }: { poolId: string }) { }, } - let signature: { hash: string; publicKey: string } | null = null + let signature: { hash: string; publicKey: string; type: 'evm' | 'substrate' } | null = null try { const message = JSON.stringify(attestation.portfolio) if (provider) { @@ -208,7 +208,7 @@ export function NavManagementAssetTable({ poolId }: { poolId: string }) { const sig = await signer.signMessage(message) const hash = keccak256(toUtf8Bytes(`\x19Ethereum Signed Message:\n${message.length}${message}`)) const recoveredPubKey = SigningKey.recoverPublicKey(hash, sig) - signature = { hash: sig, publicKey: recoveredPubKey } + signature = { hash: sig, publicKey: recoveredPubKey, type: 'evm' } } else if (substrate.selectedAccount?.address && substrate?.selectedWallet?.signer?.signRaw) { const { address } = substrate.selectedAccount const { signature: sig } = await substrate.selectedWallet.signer.signRaw({ @@ -216,7 +216,7 @@ export function NavManagementAssetTable({ poolId }: { poolId: string }) { data: stringToHex(message), type: 'bytes', }) - signature = { hash: sig, publicKey: addressToHex(address) } + signature = { hash: sig, publicKey: addressToHex(address), type: 'substrate' } } } catch {} if (!signature) return null @@ -258,7 +258,10 @@ export function NavManagementAssetTable({ poolId }: { poolId: string }) { return api.tx.oraclePriceFeed.feed(feed, CurrencyBalance.fromFloat(f.value, 18)) }), api.tx.oraclePriceCollection.updateCollection(poolId), - api.tx.remarks.remark([{ Named: attestationHash }], api.tx.loans.updatePortfolioValuation(poolId)), + api.tx.remarks.remark( + [{ Named: `attestation:${poolId}:${attestationHash}` }], + api.tx.loans.updatePortfolioValuation(poolId) + ), api.tx.utility.batch(updateTokenPricesTxs), ]