From c3492e90dffb11538679d20f40dda16a85075354 Mon Sep 17 00:00:00 2001 From: Rigidity Date: Tue, 10 Feb 2026 14:23:30 -0500 Subject: [PATCH 1/2] Fix address calculation --- crates/sage/src/endpoints/data.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/crates/sage/src/endpoints/data.rs b/crates/sage/src/endpoints/data.rs index ca91aacd..d8245261 100644 --- a/crates/sage/src/endpoints/data.rs +++ b/crates/sage/src/endpoints/data.rs @@ -1,8 +1,8 @@ use crate::{ - Error, Result, Sage, address_kind, parse_any_asset_id, parse_asset_id, parse_collection_id, - parse_did_id, parse_nft_id, parse_option_id, + address_kind, parse_any_asset_id, parse_asset_id, parse_collection_id, parse_did_id, + parse_nft_id, parse_option_id, Error, Result, Sage, }; -use base64::{Engine, prelude::BASE64_STANDARD}; +use base64::{prelude::BASE64_STANDARD, Engine}; use chia_wallet_sdk::chia::puzzle_types::nft::NftMetadata; use chia_wallet_sdk::prelude::*; use chia_wallet_sdk::{driver::BURN_PUZZLE_HASH, utils::Address}; @@ -191,7 +191,7 @@ impl Sage { for row in rows { coins.push(CoinRecord { coin_id: hex::encode(row.coin.coin_id()), - address: Address::new(row.coin.puzzle_hash, self.network().prefix()).encode()?, + address: Address::new(row.p2_puzzle_hash, self.network().prefix()).encode()?, amount: Amount::u64(row.coin.amount), transaction_id: row.mempool_item_hash.map(hex::encode), offer_id: row.offer_hash.map(hex::encode), @@ -242,7 +242,7 @@ impl Sage { for row in rows { coins.push(CoinRecord { coin_id: hex::encode(row.coin.coin_id()), - address: Address::new(row.coin.puzzle_hash, self.network().prefix()).encode()?, + address: Address::new(row.p2_puzzle_hash, self.network().prefix()).encode()?, amount: Amount::u64(row.coin.amount), transaction_id: row.mempool_item_hash.map(hex::encode), offer_id: row.offer_hash.map(hex::encode), From b3a2da719426fa3440585b858c3812c0c5751f0b Mon Sep 17 00:00:00 2001 From: Rigidity Date: Tue, 10 Feb 2026 14:24:16 -0500 Subject: [PATCH 2/2] Fix imports --- crates/sage/src/endpoints/data.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/sage/src/endpoints/data.rs b/crates/sage/src/endpoints/data.rs index d8245261..1edd97a1 100644 --- a/crates/sage/src/endpoints/data.rs +++ b/crates/sage/src/endpoints/data.rs @@ -1,8 +1,8 @@ use crate::{ - address_kind, parse_any_asset_id, parse_asset_id, parse_collection_id, parse_did_id, - parse_nft_id, parse_option_id, Error, Result, Sage, + Error, Result, Sage, address_kind, parse_any_asset_id, parse_asset_id, parse_collection_id, + parse_did_id, parse_nft_id, parse_option_id, }; -use base64::{prelude::BASE64_STANDARD, Engine}; +use base64::{Engine, prelude::BASE64_STANDARD}; use chia_wallet_sdk::chia::puzzle_types::nft::NftMetadata; use chia_wallet_sdk::prelude::*; use chia_wallet_sdk::{driver::BURN_PUZZLE_HASH, utils::Address};