Skip to content

Commit

Permalink
Return txid from fund vault. Fix tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
cryptoquick committed Nov 11, 2023
1 parent 6f594e3 commit 3266dc2
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/web/bitcoin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -204,4 +204,6 @@ export interface WalletData {
export interface FundVaultDetails {
assetsOutput?: string;
udasOutput?: string;
isFunded: boolean;
fundTxid: string;
}
2 changes: 2 additions & 0 deletions src/bitcoin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,7 @@ pub async fn fund_vault(
assets_output,
udas_output,
is_funded: true,
fund_txid: Some(asset_txid.to_hex()),
})
}

Expand Down Expand Up @@ -459,6 +460,7 @@ pub async fn get_assets_vault(
assets_output,
udas_output,
is_funded,
fund_txid: None,
})
}

Expand Down
1 change: 1 addition & 0 deletions src/structs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ pub struct FundVaultDetails {
pub assets_output: Option<String>,
pub udas_output: Option<String>,
pub is_funded: bool,
pub fund_txid: Option<String>,
}

#[derive(Serialize, Deserialize, Debug, Clone)]
Expand Down
3 changes: 3 additions & 0 deletions tests/rgb/integration/transfers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1906,6 +1906,7 @@ async fn allow_consecutive_full_transfer_bidirectional() -> anyhow::Result<()> {
consig,
psbt,
commit: _,
..
} = full_transfer_resp;

let request = SignPsbtRequest {
Expand Down Expand Up @@ -1969,6 +1970,7 @@ async fn allow_consecutive_full_transfer_bidirectional() -> anyhow::Result<()> {
consig,
psbt,
commit: _,
..
} = full_transfer_resp;

let request = SignPsbtRequest {
Expand Down Expand Up @@ -2082,6 +2084,7 @@ async fn allow_save_transfer_and_verify() -> anyhow::Result<()> {
consig,
psbt,
commit: _,
..
} = resp;

let request = SignPsbtRequest {
Expand Down

0 comments on commit 3266dc2

Please sign in to comment.