Skip to content

Commit

Permalink
[add] test
Browse files Browse the repository at this point in the history
  • Loading branch information
ymuichiro committed Aug 5, 2023
1 parent a82218a commit 41a138f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
1 change: 0 additions & 1 deletion packages/app/pages/account/public-key.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@ export default function AccountPublicKey(props: P): JSX.Element {
const handleGenerateNew = async () => {
const network = new NetworkSymbol();
const newAccount = AccountUser.generateNewAccount(network.networkType);
console.log(newAccount.publicKey, network.networkType);
const userAccount = new AccountUser(newAccount.publicKey, network.networkType);
const systemAccount: AccountSystem = new AccountSystem(network.networkType);
const textData: string[] = [
Expand Down
1 change: 0 additions & 1 deletion packages/app/services/AccountBase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ export default class AccountBase {

protected constructor(publicKey: string, networkType: NetworkType) {
this.privateMessage = 'this is a private message!';
console.log({ publicKey, networkType });
this.account = PublicAccount.createFromPublicKey(publicKey, networkType);
this.networkType = networkType;
}
Expand Down
7 changes: 4 additions & 3 deletions packages/app/services/AccountSystem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ import { EncryptedMessage } from 'symbol-sdk/dist/src/model/message';
import { NetworkType } from 'symbol-sdk/dist/src/model/network';
import AccountBase from './AccountBase';

const systemPublicKey = process.env.NEXT_PUBLIC_SYMBOL_SYSTEM_PUBLICKEY;

export class AccountSystem extends AccountBase {
public constructor(networkType: NetworkType) {
super(systemPublicKey, networkType);
if (!process.env.NEXT_PUBLIC_SYMBOL_SYSTEM_PUBLICKEY) {
throw new Error('NEXT_PUBLIC_SYMBOL_SYSTEM_PUBLICKEY is not set');
}
super(process.env.NEXT_PUBLIC_SYMBOL_SYSTEM_PUBLICKEY, networkType);
}

/** only server side */
Expand Down

0 comments on commit 41a138f

Please sign in to comment.