Skip to content

Commit 107de7a

Browse files
committed
upate ts program
1 parent c035d90 commit 107de7a

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed
Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,25 @@
1-
import { Account, Pubkey, Result, u8, Signer } from "@solanaturbine/poseidon";
1+
import { Account, Pubkey, Result, u8, Signer } from '@solanaturbine/poseidon';
22

33
export default class closeAccountProgram {
4-
static PROGRAM_ID = new Pubkey("7U4SZvsUMjGYCwnzqGGE9enJactKhVPF2EaE7VHtBLTd");
4+
static PROGRAM_ID = new Pubkey('7U4SZvsUMjGYCwnzqGGE9enJactKhVPF2EaE7VHtBLTd');
55

66
// create user account
77

88
create_user(user_account: closeAccountState, user: Signer): Result {
99

10-
user_account.derive(["user", user.key])
11-
.init();
10+
user_account.derive(['user', user.key]).init();
1211

1312
// Set the initial value to the `user_account` fields
1413
user_account.user = user.key;
1514
user_account.bump = user_account.getBump();
16-
17-
15+
1816
}
1917

2018
// close user account
2119

2220
close_user(user_account:closeAccountState, user:Signer): Result {
2321
user_account.close(user)
2422
}
25-
2623

2724
}
2825

@@ -31,5 +28,4 @@ export default class closeAccountProgram {
3128
export interface closeAccountState extends Account {
3229
user: Pubkey; // This field store the user pub key
3330
bump: u8; // bump is for PDA (program derieved account, a special type of account which controlled by program on Solana)
34-
// name: string;
3531
}

0 commit comments

Comments
 (0)