Skip to content

Commit

Permalink
Properly construct uint64 objects for LineageProof amounts in WalletS…
Browse files Browse the repository at this point in the history
…ingletonStore's add_spend.
  • Loading branch information
AmineKhaldi committed Mar 20, 2024
1 parent 1cee7f1 commit a918aa9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions chia/wallet/wallet_singleton_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,10 @@ async def add_spend(

lineage_bytes = [x.as_atom() for x in coin_state.solution.to_program().first().as_iter()]
if len(lineage_bytes) == 2:
lineage_proof = LineageProof(bytes32(lineage_bytes[0]), None, int_from_bytes(lineage_bytes[1]))
lineage_proof = LineageProof(bytes32(lineage_bytes[0]), None, uint64(int_from_bytes(lineage_bytes[1])))
else:
lineage_proof = LineageProof(
bytes32(lineage_bytes[0]), bytes32(lineage_bytes[1]), int_from_bytes(lineage_bytes[2])
bytes32(lineage_bytes[0]), bytes32(lineage_bytes[1]), uint64(int_from_bytes(lineage_bytes[2]))
)
# Create and save the new singleton record
new_record = SingletonRecord(
Expand Down

0 comments on commit a918aa9

Please sign in to comment.