Skip to content
This repository was archived by the owner on Feb 4, 2026. It is now read-only.

Commit da6ea84

Browse files
authored
rename token.Store interface to token.BalanceStore (#16)
1 parent 106054e commit da6ea84

5 files changed

Lines changed: 7 additions & 7 deletions

File tree

examples/erc20_utxo/service/allowance/allowance.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ var (
1616
)
1717

1818
type Service struct {
19-
balance token.Store
19+
balance token.BalanceStore
2020
account account.Getter
2121
}
2222

23-
func NewService(account account.Getter, balance token.Store) *Service {
23+
func NewService(account account.Getter, balance token.BalanceStore) *Service {
2424
return &Service{
2525
account: account,
2626
balance: balance,

extensions/token/balance.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ import (
1010
type BalanceService struct {
1111
Account account.Getter
1212
Token TokenGetter
13-
Store Store
13+
Store BalanceStore
1414
}
1515

1616
func NewBalanceService(
1717
accountResolver account.Getter,
1818
tokenGetter TokenGetter,
19-
store Store) *BalanceService {
19+
store BalanceStore) *BalanceService {
2020

2121
return &BalanceService{
2222
Account: accountResolver,

extensions/token/balance_account.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
"github.com/hyperledger-labs/cckit/state"
1010
)
1111

12-
var _ Store = &AccountStore{}
12+
var _ BalanceStore = &AccountStore{}
1313

1414
type AccountStore struct {
1515
}

extensions/token/balance_store.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ type (
1212
TxId string
1313
}
1414

15-
Store interface {
15+
BalanceStore interface {
1616
Get(router.Context, *BalanceId) (*Balance, error)
1717
GetLocked(router.Context, *BalanceId) (*Balance, error)
1818
List(router.Context, *TokenId) ([]*Balance, error)

extensions/token/balance_utxo.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
"github.com/hyperledger-labs/cckit/state"
1010
)
1111

12-
var _ Store = &UTXOStore{}
12+
var _ BalanceStore = &UTXOStore{}
1313

1414
var (
1515
ErrSenderRecipientEqual = errors.New(`sender recipient equal`)

0 commit comments

Comments
 (0)