mirror of
https://github.com/logos-blockchain/lssa.git
synced 2026-03-16 09:03:09 +00:00
fix: use base58 encoding for program_owner instead of hex
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
546c3d0986
commit
e20860ea97
1
Cargo.lock
generated
1
Cargo.lock
generated
@ -8989,6 +8989,7 @@ dependencies = [
|
||||
"amm_core",
|
||||
"anyhow",
|
||||
"async-stream",
|
||||
"base58",
|
||||
"base64 0.22.1",
|
||||
"borsh",
|
||||
"clap",
|
||||
|
||||
@ -21,6 +21,7 @@ humantime-serde.workspace = true
|
||||
humantime.workspace = true
|
||||
tokio = { workspace = true, features = ["macros"] }
|
||||
clap.workspace = true
|
||||
base58.workspace = true
|
||||
base64.workspace = true
|
||||
borsh.workspace = true
|
||||
hex.workspace = true
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
use std::{collections::HashMap, path::PathBuf, str::FromStr};
|
||||
|
||||
use anyhow::Result;
|
||||
use base58::ToBase58;
|
||||
use key_protocol::key_protocol_core::NSSAUserData;
|
||||
use nssa::Account;
|
||||
use nssa_core::account::Nonce;
|
||||
@ -155,13 +156,12 @@ pub(crate) struct HumanReadableAccount {
|
||||
|
||||
impl From<Account> for HumanReadableAccount {
|
||||
fn from(account: Account) -> Self {
|
||||
let program_owner = hex::encode(
|
||||
account
|
||||
.program_owner
|
||||
.iter()
|
||||
.flat_map(|n| n.to_le_bytes())
|
||||
.collect::<Vec<u8>>(),
|
||||
);
|
||||
let program_owner = account
|
||||
.program_owner
|
||||
.iter()
|
||||
.flat_map(|n| n.to_le_bytes())
|
||||
.collect::<Vec<u8>>()
|
||||
.to_base58();
|
||||
let data = hex::encode(account.data);
|
||||
Self {
|
||||
balance: account.balance,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user