Skip to content

Commit 3f3c27c

Browse files
committed
fix: correct apply_delta_to_u128 signature to take &i128 (closes #407)
The IDataStore trait declared delta: i128 (owned) while every call site in the same file passes a reference (&fee_tokens, &net_collateral). Changed the trait declaration to delta: &i128 to match the Soroban client convention and all existing call sites.
1 parent 8b916d6 commit 3f3c27c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • libs/increase_position_utils/src

libs/increase_position_utils/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ trait IDataStore {
2828
fn get_u128(env: Env, key: BytesN<32>) -> u128;
2929
fn get_i128(env: Env, key: BytesN<32>) -> i128;
3030
fn set_u128(env: Env, caller: Address, key: BytesN<32>, value: u128) -> u128;
31-
fn apply_delta_to_u128(env: Env, caller: Address, key: BytesN<32>, delta: i128) -> u128;
31+
fn apply_delta_to_u128(env: Env, caller: Address, key: BytesN<32>, delta: &i128) -> u128;
3232
fn apply_delta_to_i128(env: Env, caller: Address, key: BytesN<32>, delta: i128) -> i128;
3333
fn get_address(env: Env, key: BytesN<32>) -> Option<Address>;
3434
fn add_bytes32_to_set(env: Env, caller: Address, set_key: BytesN<32>, value: BytesN<32>);

0 commit comments

Comments
 (0)