Skip to content

Commit

Permalink
fix: use promise_create_call for calling one promise (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
aleksuss authored Apr 17, 2024
1 parent 21de33e commit 7554e3b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions forwarder/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ pub extern "C" fn calculate_fees_callback() {
};

let promise_id = unsafe {
let promise_id = io.promise_create_and_combine(&[PromiseCreateArgs {
let promise_id = io.promise_create_call(&PromiseCreateArgs {
target_account_id: state.fees_contract_id,
method: "calculate_fees",
args: types::to_borsh(&FeesParams {
Expand All @@ -115,7 +115,7 @@ pub extern "C" fn calculate_fees_callback() {
.sdk_unwrap(),
attached_balance: ZERO_YOCTO,
attached_gas: CALCULATE_FEES_GAS,
}]);
});

io.promise_attach_callback(
promise_id,
Expand Down
2 changes: 1 addition & 1 deletion tests/src/tests/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ async fn test_storage_deposit_refund() {
let balance_after_create = sandbox.balance(factory.id()).await;
assert_eq!(
to_near(balance_before_create - balance_after_create),
0.358_680 // Ⓝ
0.358_679 // Ⓝ
);

let sk = SecretKey::from_str("ed25519:61TF7S52FVETjLp6KMUDp1TYBEdc1km1GnHgZc67VhWfyHTCUTMjUY6mM3qML17EAHFiutjpmF4CD9wdSGtG19tR").unwrap();
Expand Down

0 comments on commit 7554e3b

Please sign in to comment.