Skip to content

Commit 4b081cb

Browse files
alexandrosfiliosadecaro
authored andcommitted
Renamed token type and format
Signed-off-by: Alexandros Filios <alexandros.filios@ibm.com>
1 parent 93d58d5 commit 4b081cb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+293
-293
lines changed

integration/token/dvp/tests.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import (
2222
)
2323

2424
const (
25-
USD = token2.TokenType("USD")
25+
USD = token2.Type("USD")
2626
)
2727

2828
func TestAll(network *integration.Infrastructure, sel *token3.ReplicaSelector) {
@@ -86,7 +86,7 @@ func sellHouse(network *integration.Infrastructure, houseID string, seller *toke
8686
common2.CheckFinality(network, buyer, common.JSONUnmarshalString(txIDBoxed), nil, false)
8787
}
8888

89-
func checkBalance(network *integration.Infrastructure, ref *token3.NodeReference, wallet string, typ token2.TokenType, expected uint64) {
89+
func checkBalance(network *integration.Infrastructure, ref *token3.NodeReference, wallet string, typ token2.Type, expected uint64) {
9090
res, err := network.Client(ref.ReplicaName()).CallView("balance", common.JSONMarshall(&views2.BalanceQuery{
9191
Wallet: wallet,
9292
Type: typ,

integration/token/dvp/views/balance.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ import (
1919
type BalanceQuery struct {
2020
TMSID token.TMSID
2121
Wallet string
22-
Type token2.TokenType
22+
Type token2.Type
2323
}
2424

2525
type Balance struct {
26-
Type token2.TokenType
26+
Type token2.Type
2727
Quantity string
2828
}
2929

integration/token/dvp/views/buyer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ func (b *BuyHouseView) Call(context view.Context) (interface{}, error) {
4646
// check action
4747
assert.Equal(otherCash, action.Recipient, "recipient mismatch")
4848
assert.True(action.Amount > 0, "amount must be greater than 0")
49-
assert.Equal(token2.TokenType("USD"), action.Type, "currency must be USD")
49+
assert.Equal(token2.Type("USD"), action.Type, "currency must be USD")
5050
assert.Equal(meCash, action.From, "sender mismatch")
5151

5252
// check house and action match

integration/token/dvp/views/cash/history.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ type ListIssuedTokens struct {
2121
// Wallet whose identities own the token
2222
Wallet string
2323
// TokenType is the token type to select
24-
TokenType token2.TokenType
24+
TokenType token2.Type
2525
}
2626

2727
type ListIssuedTokensView struct {

integration/token/dvp/views/cash/issue.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ type IssueCash struct {
2121
// IssuerWallet is the issuer's wallet to use
2222
IssuerWallet string
2323
// TokenType is the type of token to issue
24-
TokenType token.TokenType
24+
TokenType token.Type
2525
// Quantity represent the number of units of a certain token type stored in the token
2626
Quantity uint64
2727
// Recipient is an identifier of the recipient identity

integration/token/dvp/views/cash/list.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ type ListUnspentTokens struct {
2222
// Wallet whose identities own the token
2323
Wallet string
2424
// TokenType is the token type to select
25-
TokenType token2.TokenType
25+
TokenType token2.Type
2626
}
2727

2828
type ListUnspentTokensView struct {

integration/token/fungible/support.go

Lines changed: 30 additions & 30 deletions
Large diffs are not rendered by default.

integration/token/fungible/views/auditor.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ func (p *RegisterAuditorViewFactory) NewView(in []byte) (view.View, error) {
208208

209209
type CurrentHolding struct {
210210
EnrollmentID string
211-
TokenType token2.TokenType
211+
TokenType token2.Type
212212
TMSID token.TMSID
213213
}
214214

@@ -247,9 +247,9 @@ func (p *CurrentHoldingViewFactory) NewView(in []byte) (view.View, error) {
247247
}
248248

249249
type CurrentSpending struct {
250-
EnrollmentID string `json:"enrollment_id"`
251-
TokenType token2.TokenType `json:"token_type"`
252-
TMSID *token.TMSID `json:"tmsid"`
250+
EnrollmentID string `json:"enrollment_id"`
251+
TokenType token2.Type `json:"token_type"`
252+
TMSID *token.TMSID `json:"tmsid"`
253253
}
254254

255255
// CurrentSpendingView is used to retrieve the current spending of token type of the passed enrollment id

integration/token/fungible/views/balance.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ type BalanceQuery struct {
2121
TMSID *token.TMSID
2222
SkipCheck bool
2323
Wallet string
24-
Type token2.TokenType
24+
Type token2.Type
2525
}
2626

2727
type Balance struct {
28-
Type token2.TokenType
28+
Type token2.Type
2929
Quantity string
3030
}
3131

integration/token/fungible/views/history.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ type ListIssuedTokens struct {
2424
// Wallet whose identities own the token
2525
Wallet string
2626
// TokenType is the token type to select
27-
TokenType token2.TokenType
27+
TokenType token2.Type
2828
// The TMS to pick in case of multiple TMSIDs
2929
TMSID *token.TMSID
3030
}

0 commit comments

Comments
 (0)