Skip to content

Commit 0b6a05f

Browse files
authored
Merge pull request #736 from xch-dev/fix-addresses
Fix address calculation
2 parents c916c50 + b3a2da7 commit 0b6a05f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

crates/sage/src/endpoints/data.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ impl Sage {
191191
for row in rows {
192192
coins.push(CoinRecord {
193193
coin_id: hex::encode(row.coin.coin_id()),
194-
address: Address::new(row.coin.puzzle_hash, self.network().prefix()).encode()?,
194+
address: Address::new(row.p2_puzzle_hash, self.network().prefix()).encode()?,
195195
amount: Amount::u64(row.coin.amount),
196196
transaction_id: row.mempool_item_hash.map(hex::encode),
197197
offer_id: row.offer_hash.map(hex::encode),
@@ -242,7 +242,7 @@ impl Sage {
242242
for row in rows {
243243
coins.push(CoinRecord {
244244
coin_id: hex::encode(row.coin.coin_id()),
245-
address: Address::new(row.coin.puzzle_hash, self.network().prefix()).encode()?,
245+
address: Address::new(row.p2_puzzle_hash, self.network().prefix()).encode()?,
246246
amount: Amount::u64(row.coin.amount),
247247
transaction_id: row.mempool_item_hash.map(hex::encode),
248248
offer_id: row.offer_hash.map(hex::encode),

0 commit comments

Comments
 (0)