From 5f9bcdd8879b9c4572601b9ffcf95d308d82fad0 Mon Sep 17 00:00:00 2001 From: gcranju Date: Fri, 26 Apr 2024 15:35:05 +0545 Subject: [PATCH] fix: interface for testing --- contracts/sui/xcall/sources/states/xcall_state.move | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/contracts/sui/xcall/sources/states/xcall_state.move b/contracts/sui/xcall/sources/states/xcall_state.move index 2947b6c3..b2e18507 100644 --- a/contracts/sui/xcall/sources/states/xcall_state.move +++ b/contracts/sui/xcall/sources/states/xcall_state.move @@ -297,9 +297,11 @@ module xcall::xcall_state { id } - #[test_only] + #[test_only] public fun share_storage_for_testing(admin:AdminCap,ctx: &mut TxContext):Storage { - create_storage(0,&admin,ctx) + let storage =create_storage(0,&admin,ctx); + transfer_admin_cap(admin,ctx); + storage } #[test_only] @@ -308,8 +310,8 @@ module xcall::xcall_state { } #[test_only] - public fun create_id_cap_for_testing(ctx: &mut TxContext):IDCap { - create_id_cap(ctx) + public fun create_id_cap_for_testing(storage: &mut Storage,ctx: &mut TxContext):IDCap { + create_id_cap(storage,ctx) } } \ No newline at end of file