Skip to content

Commit b3fa8b5

Browse files
authored
fix(rust-client): fix oracle tutorial bech32 conversion (#149)
1 parent 03d04ae commit b3fa8b5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

docs/src/rust-client/oracle_tutorial.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ async fn main() -> Result<(), ClientError> {
172172
// Get all foreign accounts for oracle data
173173
// -------------------------------------------------------------------------
174174
let oracle_bech32 = "mtst1qq0zffxzdykm7qqqqdt24cc2du5ghx99";
175-
let oracle_account_id = AccountId::from_hex(oracle_bech32).unwrap();
175+
let (_, oracle_account_id) = AccountId::from_bech32(oracle_bech32).unwrap();
176176
let btc_usd_pair_id = 120195681;
177177
let foreign_accounts: Vec<ForeignAccount> =
178178
get_oracle_foreign_accounts(&mut client, oracle_account_id, btc_usd_pair_id).await?;

rust-client/src/bin/oracle_data_query.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ async fn main() -> Result<(), ClientError> {
115115
// Get all foreign accounts for oracle data
116116
// -------------------------------------------------------------------------
117117
let oracle_bech32 = "mtst1qq0zffxzdykm7qqqqdt24cc2du5ghx99";
118-
let oracle_account_id = AccountId::from_hex(oracle_bech32).unwrap();
118+
let (_, oracle_account_id) = AccountId::from_bech32(oracle_bech32).unwrap();
119119
let btc_usd_pair_id = 120195681;
120120
let foreign_accounts: Vec<ForeignAccount> =
121121
get_oracle_foreign_accounts(&mut client, oracle_account_id, btc_usd_pair_id).await?;

0 commit comments

Comments
 (0)