Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding Utility funtion to setup user, game accounts #24

Merged
merged 2 commits into from
May 28, 2024
Merged

Conversation

Abhay-2811
Copy link

Code cleanup on action.rs. New utility function: initial_setup, sets up the required game account, user account and fungible asset.

@Abhay-2811 Abhay-2811 requested a review from nlok5923 May 27, 2024 09:02
@Abhay-2811 Abhay-2811 self-assigned this May 27, 2024
@nlok5923
Copy link
Member

nlok5923 commented May 27, 2024

@Abhay-2811 Can you please change the base to develop. Also please assign an appropriate title to pr.

@@ -83,3 +81,69 @@ pub async fn log_slots(client: &AzeClient, account_id: AccountId) {
println!("Account slot {:?} --> {:?}", i, regular_account.storage().get_item(i));
}
}

pub async fn initial_setup(mut client: &mut AzeClient) -> (FungibleAsset, AccountId, AccountId, GameStorageSlotData){
let small_blind_amt = 5u8;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's make these values as default constants and store it in lib/src/constant modules

@@ -83,3 +81,69 @@ pub async fn log_slots(client: &AzeClient, account_id: AccountId) {
println!("Account slot {:?} --> {:?}", i, regular_account.storage().get_item(i));
}
}

pub async fn initial_setup(mut client: &mut AzeClient) -> (FungibleAsset, AccountId, AccountId, GameStorageSlotData){
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes looks good can we rename initial_setup to something more reflective ?

@Abhay-2811 Abhay-2811 changed the base branch from main to develop May 27, 2024 09:53
@Abhay-2811 Abhay-2811 changed the title Refactor action.rs Adding Utility funtion to setup user, game accounts May 27, 2024
@nlok5923 nlok5923 merged commit 4c7d120 into develop May 28, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants