Skip to content

Commit

Permalink
feat(wallet): 添加可自定义的名字接口 (#52)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexskim authored May 11, 2024
1 parent e1a4844 commit f91b28e
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions wallet/wallet.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ var (
DBPath: "data/wallet/wallet.db",
},
}
walletName = "Atri币"
)

func init() {
Expand All @@ -49,6 +50,16 @@ func init() {
}
}

// GetWalletName 获取货币名称
func GetWalletName() string {
return walletName
}

// SetWalletName 设置货币名称
func SetWalletName(name string) {
walletName = name
}

// GetWalletOf 获取钱包数据
func GetWalletOf(uid int64) (money int) {
return sdb.getWalletOf(uid).Money
Expand Down

0 comments on commit f91b28e

Please sign in to comment.