Skip to content

Commit

Permalink
fix leftover references to RGB interfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
zoedberg committed Jan 25, 2024
1 parent e1e0190 commit 52571eb
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion docs/transfer_flows.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ rgb-lib wallets. Sending assets can be done in two ways. See the sections for
the [default](#2.-asset-transfer-(non-donation)) and
[donation](#3.-asset-transfer-(donation)) ways below for details.

These examples use RGB20 (fungible) assets but the same applies to RGB121
These examples use NIA (fungible) assets but the same applies to UDA
(non-fungible) assets as well.

You might also want to have a look at the similar [flow for RGB protocol in
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
//! ## Wallet
//! The main component of the library is the [`Wallet`].
//!
//! It allows to create and operate an RGB wallet that can issue, send and receive RGB20 and RGB25
//! It allows to create and operate an RGB wallet that can issue, send and receive NIA, CFA and UDA
//! assets. The library also manages UTXOs and asset allocations.
//!
//! ## Backend
Expand Down
4 changes: 2 additions & 2 deletions src/wallet/test/get_asset_balance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ fn success() {

let (wallet, online) = get_funded_wallet!();

// issue an RGB20 asset
// issue an NIA asset
let asset = test_issue_asset_nia(&wallet, &online, None);

// balances after issuance
Expand All @@ -28,7 +28,7 @@ fn success() {
}
);

// issue an RGB25 asset
// issue an CFA asset
let asset = test_issue_asset_cfa(&wallet, &online, None, None);

// balances after issuance
Expand Down
6 changes: 3 additions & 3 deletions src/wallet/test/list_assets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ fn success() {
);
assert_eq!(assets.nia.unwrap().len(), 0);

// one issued RGB20 asset
// one issued NIA asset
let asset_1 = test_issue_asset_nia(&wallet, &online, None);
let assets = test_list_assets(&wallet, &[]);
let nia_assets = assets.nia.unwrap();
Expand All @@ -39,7 +39,7 @@ fn success() {
}
);

// two issued RGB20 assets
// two issued NIA assets
let asset_2 = wallet
.issue_asset_nia(
online.clone(),
Expand Down Expand Up @@ -68,7 +68,7 @@ fn success() {
}
);

// three issued assets: 2x RGB20 + 1x RGB25
// three issued assets: 2x NIA + 1x CFA
let asset_3 = test_issue_asset_cfa(&wallet, &online, Some(&[AMOUNT * 3]), None);
let assets = test_list_assets(&wallet, &[]);
let nia_assets = assets.nia.unwrap();
Expand Down
4 changes: 2 additions & 2 deletions src/wallet/test/list_transfers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ fn success() {
let (wallet, online) = get_funded_wallet!();
let (rcv_wallet, rcv_online) = get_funded_wallet!();

// issue RGB20 asset
// issue NIA asset
let asset = test_issue_asset_nia(&wallet, &online, None);

// single transfer (issuance)
Expand All @@ -31,7 +31,7 @@ fn success() {
fund_wallet(test_get_address(&wallet));
test_create_utxos_default(&wallet, &online);

// issue RGB25 asset
// issue CFA asset
let asset = test_issue_asset_cfa(&wallet, &online, None, None);

// single transfer (issuance)
Expand Down
18 changes: 9 additions & 9 deletions src/wallet/test/send.rs
Original file line number Diff line number Diff line change
Expand Up @@ -996,7 +996,7 @@ fn send_received_success() {
assert_eq!(change_allocation_a.amount, amount_1a - amount_2a);
assert_eq!(change_allocation_b.amount, amount_1b - amount_2b);

// check RGB25 asset has the correct media after being received
// check CFA asset has the correct media after being received
let cfa_assets = wallet_3
.list_assets(vec![AssetSchema::Cfa])
.unwrap()
Expand Down Expand Up @@ -2848,15 +2848,15 @@ fn cfa_blank_success() {
let (wallet, online) = get_funded_wallet!();
let (rcv_wallet, _rcv_online) = get_funded_wallet!();

// issue RGB20
// issue NIA
let asset_nia = test_issue_asset_nia(&wallet, &online, None);

// issue RGB25
// issue CFA
let _asset_cfa = test_issue_asset_cfa(&wallet, &online, None, None);

let receive_data = test_blind_receive(&rcv_wallet);

// try sending RGB20
// try sending NIA
let recipient_map = HashMap::from([(
asset_nia.asset_id,
vec![Recipient {
Expand Down Expand Up @@ -2885,7 +2885,7 @@ fn psbt_rgb_consumer_success() {
let num_utxos_created = test_create_utxos(&wallet, &online, true, Some(1), None, FEE_RATE);
assert_eq!(num_utxos_created, 1);

// issue an RGB20 asset
// issue an NIA asset
println!("issue 1");
let asset_nia_a = test_issue_asset_nia(&wallet, &online, None);

Expand All @@ -2910,7 +2910,7 @@ fn psbt_rgb_consumer_success() {
let result = test_send_begin_result(&wallet, &online, &recipient_map);
assert!(!result.unwrap().is_empty());

// issue one more RGB20 asset, should go to the same UTXO as the 1st issuance
// issue one more NIA asset, should go to the same UTXO as the 1st issuance
println!("issue 2");
let asset_nia_b = test_issue_asset_nia(&wallet, &online, None);

Expand Down Expand Up @@ -2997,7 +2997,7 @@ fn insufficient_bitcoins() {
assert_eq!(num_utxos_created, 1);
test_drain_to_keep(&wallet, &online, &test_get_address(&rcv_wallet));

// issue an RGB20 asset
// issue an NIA asset
let asset_nia_a = test_issue_asset_nia(&wallet, &online, None);

// send with no colorable UTXOs available as additional bitcoin inputs and no other funds
Expand Down Expand Up @@ -3063,7 +3063,7 @@ fn insufficient_allocations_fail() {
);
assert_eq!(num_utxos_created, 1);

// issue an RGB20 asset
// issue an NIA asset
let asset_nia_a = test_issue_asset_nia(&wallet, &online, None);

// send with no colorable UTXOs available as change
Expand Down Expand Up @@ -3109,7 +3109,7 @@ fn insufficient_allocations_success() {
test_create_utxos(&wallet, &online, false, Some(1), Some(300), FEE_RATE);
assert_eq!(num_utxos_created, 1);

// issue an RGB20 asset on the unspendable UTXO
// issue an NIA asset on the unspendable UTXO
let asset_nia_a = test_issue_asset_nia(&wallet, &online, None);

// create 2 more UTXOs, 1 for change + 1 as additional bitcoin input
Expand Down

0 comments on commit 52571eb

Please sign in to comment.