Skip to content

Commit

Permalink
feat: account info support starknet cairo version.
Browse files Browse the repository at this point in the history
  • Loading branch information
Zhangguiguang committed Jan 8, 2024
1 parent 2fc125e commit 3d0fa38
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion core/wallet/cache_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,5 +168,5 @@ func TestDecimalPrivatekey(t *testing.T) {
t.Log(wallet.AptosAccountInfo().Address())
t.Log(wallet.SuiAccountInfo().Address())
t.Log(wallet.StarcoinAccountInfo().Address())
t.Log(wallet.StarknetAccountInfo().Address())
t.Log(wallet.StarknetAccountInfo(false).Address())
}
4 changes: 2 additions & 2 deletions core/wallet/cache_wallet.go
Original file line number Diff line number Diff line change
Expand Up @@ -271,10 +271,10 @@ func (w *CacheWallet) StarcoinAccountInfo() *AccountInfo {
}
}

func (w *CacheWallet) StarknetAccountInfo() *AccountInfo {
func (w *CacheWallet) StarknetAccountInfo(isCairo0 bool) *AccountInfo {
return &AccountInfo{
Wallet: w,
cacheKey: "starknet",
cacheKey: fmt.Sprintf("starknet-%v", isCairo0),
mnemonicCreator: func(val string) (base.Account, error) {
return starknet.NewAccountWithMnemonic(val)
},
Expand Down

0 comments on commit 3d0fa38

Please sign in to comment.