Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
V2.0.0-rc.2
---------------------

- Release temporary withdrawal-map reward addresses immediately and preserve unsigned 64-bit withdrawal amounts when reading maps.
- Bundle cardano-c 2.0.0-rc.5 so transaction inspection includes Dijkstra fields and nested witnesses.
- Fix documentation generation and check the docs build in CI.
- Add Dijkstra transaction examples to the README.
Expand Down
5 changes: 3 additions & 2 deletions src/marshaling/withdrawalMap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,13 @@ export const readWithdrawalMap = (mapPtr: number): Withdrawals => {
);

rewardAddressPtr = module.getValue(rewardAddressPtrPtr, 'i32');
const rewardAddress = new RewardAddress(rewardAddressPtr);
const rewardAddress = new RewardAddress(rewardAddressPtr, false);

const low = module.getValue(amountPtr, 'i32') >>> 0;
const high = module.getValue(amountPtr + 4, 'i32');
const high = module.getValue(amountPtr + 4, 'i32') >>> 0;
result[rewardAddress.toBech32()] = (BigInt(high) << 32n) | BigInt(low);
} finally {
if (rewardAddressPtr) unrefObject(rewardAddressPtr);
module._free(rewardAddressPtrPtr);
module._free(amountPtr);
}
Expand Down
2 changes: 1 addition & 1 deletion test/marshaling/withdrawalMap.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ describe('WithdrawalMap', () => {
};

const withdrawals2: Cometa.Withdrawals = {
stake178phkx6acpnf78fuvxn0mkew3l0fd058hzquvz7w36x4gtcccycj5: 999999999999999999n
stake178phkx6acpnf78fuvxn0mkew3l0fd058hzquvz7w36x4gtcccycj5: 0xffffffffffffffffn
};

beforeAll(async () => {
Expand Down
Loading