Skip to content

Commit 2b17f54

Browse files
authored
Merge branch 'master' into evgenii/non-protocol-entities-json
2 parents 0fee459 + e55a274 commit 2b17f54

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

rust/src/tx_builder.rs

+6-1
Original file line numberDiff line numberDiff line change
@@ -1098,7 +1098,12 @@ impl TransactionBuilder {
10981098
.map(|m| m.get(&policy_id).as_ref().cloned())
10991099
.unwrap_or(None)
11001100
.unwrap_or(MintAssets::new());
1101-
asset.insert(asset_name, amount);
1101+
if let Some(mint_amount) = asset.get(asset_name) {
1102+
let new_amount = mint_amount.0 + amount.0;
1103+
asset.insert(asset_name, Int(new_amount));
1104+
} else {
1105+
asset.insert(asset_name, amount);
1106+
}
11021107
self._set_mint_asset(&policy_id, policy_script, &asset);
11031108
}
11041109

0 commit comments

Comments
 (0)