Skip to content

Commit 8c035f4

Browse files
committed
fix: Address hash determinism
1 parent 4147801 commit 8c035f4

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

packages/evolution/src/core/Address.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,12 @@ export class Address extends Schema.Class<Address>("AddressStructure")({
5151
}
5252

5353
[Hash.symbol](): number {
54-
return Hash.hash(this.toJSON())
54+
return Hash.cached(
55+
this,
56+
Hash.combine(
57+
Hash.combine(Hash.number(this.networkId))(Hash.hash(this.paymentCredential))
58+
)(Hash.hash(this.stakingCredential))
59+
)
5560
}
5661
}
5762

0 commit comments

Comments
 (0)