Skip to content

Commit

Permalink
Merge pull request #20 from Chia-Network/additional-wallet-data
Browse files Browse the repository at this point in the history
Add additional data to get_wallets and get_wallet_balance
  • Loading branch information
cmmarslender authored Jul 8, 2022
2 parents a81f2cc + 86dcec1 commit 7b50eac
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 11 deletions.
5 changes: 3 additions & 2 deletions pkg/rpc/wallet.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,9 @@ func (s *WalletService) GetNetworkInfo() (*GetWalletNetworkInfoResponse, *http.R

// GetWalletsResponse wallet rpc -> get_wallets
type GetWalletsResponse struct {
Success bool `json:"success"`
Wallets []*types.WalletInfo `json:"wallets"`
Success bool `json:"success"`
Fingerprint int `json:"fingerprint"`
Wallets []*types.WalletInfo `json:"wallets"`
}

// GetWallets wallet rpc -> get_wallets
Expand Down
20 changes: 11 additions & 9 deletions pkg/types/wallet.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,15 @@ type WalletInfo struct {

// WalletBalance specific wallet balance information
type WalletBalance struct {
WalletID int32 `json:"wallet_id"`
Fingerprint int `json:"fingerprint"`
ConfirmedWalletBalance Uint128 `json:"confirmed_wallet_balance"`
UnconfirmedWalletBalance Uint128 `json:"unconfirmed_wallet_balance"`
SpendableBalance Uint128 `json:"spendable_balance"`
PendingChange int64 `json:"pending_change"`
MaxSendAmount int64 `json:"max_send_amount"`
UnspentCoinCount int64 `json:"unspent_coin_count"`
PendingCoinRemovalCount int64 `json:"pending_coin_removal_count"`
WalletID int32 `json:"wallet_id"`
Fingerprint int `json:"fingerprint"`
ConfirmedWalletBalance Uint128 `json:"confirmed_wallet_balance"`
UnconfirmedWalletBalance Uint128 `json:"unconfirmed_wallet_balance"`
SpendableBalance Uint128 `json:"spendable_balance"`
PendingChange int64 `json:"pending_change"`
MaxSendAmount int64 `json:"max_send_amount"`
UnspentCoinCount int64 `json:"unspent_coin_count"`
PendingCoinRemovalCount int64 `json:"pending_coin_removal_count"`
WalletType *WalletType `json:"wallet_type"`
AssetID string `json:"asset_id"`
}

0 comments on commit 7b50eac

Please sign in to comment.