storj/satellite/payments/balance.go
Wilfred Asomani b1d4763086 satellite/{web,payments}: show STORJ balance
This change adds a card to the billing overview page, which shows the
user's token balance from coinpayments.

Issue: https://github.com/storj/storj-private/issues/151

Change-Id: I11e295b48791b32b745cb7a11c5b4aad6b56618e
2023-03-10 13:01:15 +00:00

22 lines
854 B
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// Copyright (C) 2020 Storj Labs, Inc.
// See LICENSE for copying information.
package payments
import (
"github.com/shopspring/decimal"
)
// Balance is an entity that holds free credits and coins balance of user.
// Earned by applying of promotional coupon and coins depositing, respectively.
type Balance struct {
FreeCredits int64 `json:"freeCredits"`
Coins decimal.Decimal `json:"coins"` // STORJ token balance from storjscan.
Credits decimal.Decimal `json:"credits"`
// Credits is the balance from stripe. This may include the following.
// 1. legacy Coinpayments deposit.
// 2. legacy credit for a manual STORJ deposit.
// 4. bonus manually credited for a storjscan payment once a month before invoicing.
// 5. any other adjustment we may have to make from time to time manually to the customer´s STORJ balance.
}