Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
smartcontracts
common
Commits
314a94aa
Commit
314a94aa
authored
6 years ago
by
Yury
Browse files
Options
Download
Email Patches
Plain Diff
- remove "gitlab.smartblocklab.com/smartcontracts/marketCC/model"
- model -> invoke
parent
accf62aa
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
function/remote/market/remote.go
+5
-6
function/remote/market/remote.go
update.sh
+6
-0
update.sh
with
11 additions
and
6 deletions
+11
-6
function/remote/market/remote.go
View file @
314a94aa
...
...
@@ -8,7 +8,6 @@ import (
"gitlab.smartblocklab.com/smartcontracts/common/model/market"
"gitlab.smartblocklab.com/smartcontracts/common/security/requests"
"gitlab.smartblocklab.com/smartcontracts/common/security/tools"
"gitlab.smartblocklab.com/smartcontracts/marketCC/model"
"gitlab.smartblocklab.com/smartcontracts/common/invoke"
)
...
...
@@ -30,7 +29,7 @@ func (this RemoteManagerImpl) DepositFunds(userID string, inputMarketFoundsObjec
return
nil
,
logging
.
Get
()
.
Error
(
"Failed to make remote call"
)
}
func
(
this
RemoteManagerImpl
)
GetBalance
(
balanceArg
market
.
MarketArg
)
(
*
market
.
MarketBalance
,
error
)
{
resp
:=
tools
.
SignedInvokeChaincode
(
this
.
adapter
,
this
.
channel
,
invoke
.
MarketaccountCC
,
model
.
GetBalanceFunction
,
balanceArg
)
resp
:=
tools
.
SignedInvokeChaincode
(
this
.
adapter
,
this
.
channel
,
invoke
.
MarketaccountCC
,
invoke
.
GetBalanceFunction
,
balanceArg
)
if
resp
.
Status
!=
200
{
return
nil
,
logging
.
Get
()
.
Error
(
resp
.
Message
)
...
...
@@ -51,7 +50,7 @@ func (this RemoteManagerImpl) CreateOrder(userID string, marketOrder market.UIMa
return
nil
,
logging
.
Get
()
.
Error
(
"Failed to make remote call"
)
}
func
(
this
RemoteManagerImpl
)
GetAllOrders
()
(
*
market
.
PlainMarketOrderList
,
error
)
{
resp
:=
tools
.
SignedInvokeChaincode
(
this
.
adapter
,
this
.
channel
,
invoke
.
MarketaccountCC
,
model
.
GetAllOrdersFunction
,
nil
)
resp
:=
tools
.
SignedInvokeChaincode
(
this
.
adapter
,
this
.
channel
,
invoke
.
MarketaccountCC
,
invoke
.
GetAllOrdersFunction
,
nil
)
if
resp
.
Status
!=
200
{
return
nil
,
logging
.
Get
()
.
Error
(
resp
.
Message
)
...
...
@@ -66,7 +65,7 @@ func (this RemoteManagerImpl) GetAllOrders() (*market.PlainMarketOrderList, erro
return
&
result
,
nil
}
func
(
this
RemoteManagerImpl
)
GetUserOrders
(
arg
requests
.
Id
)
(
*
market
.
PlainMarketOrderList
,
error
)
{
resp
:=
tools
.
SignedInvokeChaincode
(
this
.
adapter
,
this
.
channel
,
invoke
.
MarketaccountCC
,
model
.
GetUserOrdersFunction
,
arg
)
resp
:=
tools
.
SignedInvokeChaincode
(
this
.
adapter
,
this
.
channel
,
invoke
.
MarketaccountCC
,
invoke
.
GetUserOrdersFunction
,
arg
)
if
resp
.
Status
!=
200
{
return
nil
,
logging
.
Get
()
.
Error
(
resp
.
Message
)
...
...
@@ -87,7 +86,7 @@ func (this RemoteManagerImpl) MatchOrders() (*market.TransactionList, error) {
return
nil
,
logging
.
Get
()
.
Error
(
"Failed to make remote call"
)
}
func
(
this
RemoteManagerImpl
)
FindOutgoingTransactions
(
arg
market
.
FindMarketTransactionArg
)
(
*
market
.
MarketTransactionList
,
error
)
{
resp
:=
tools
.
SignedInvokeChaincode
(
this
.
adapter
,
this
.
channel
,
invoke
.
MarketaccountCC
,
model
.
FindOutgoingTransactionsFunction
,
arg
)
resp
:=
tools
.
SignedInvokeChaincode
(
this
.
adapter
,
this
.
channel
,
invoke
.
MarketaccountCC
,
invoke
.
FindOutgoingTransactionsFunction
,
arg
)
if
resp
.
Status
!=
200
{
return
nil
,
logging
.
Get
()
.
Error
(
resp
.
Message
)
...
...
@@ -102,7 +101,7 @@ func (this RemoteManagerImpl) FindOutgoingTransactions(arg market.FindMarketTran
return
&
result
,
nil
}
func
(
this
RemoteManagerImpl
)
FindIncomingTransactions
(
arg
market
.
FindMarketTransactionArg
)
(
*
market
.
MarketTransactionList
,
error
)
{
resp
:=
tools
.
SignedInvokeChaincode
(
this
.
adapter
,
this
.
channel
,
invoke
.
MarketaccountCC
,
model
.
FindIncomingTransactionsFunction
,
arg
)
resp
:=
tools
.
SignedInvokeChaincode
(
this
.
adapter
,
this
.
channel
,
invoke
.
MarketaccountCC
,
invoke
.
FindIncomingTransactionsFunction
,
arg
)
if
resp
.
Status
!=
200
{
return
nil
,
logging
.
Get
()
.
Error
(
resp
.
Message
)
...
...
This diff is collapsed.
Click to expand it.
update.sh
View file @
314a94aa
...
...
@@ -22,6 +22,12 @@ function updateGoVendor {
govendor update gitlab.smartblocklab.com/smartcontracts/common/chaincodetest
&&
govendor update gitlab.smartblocklab.com/smartcontracts/common/logging
&&
govendor update gitlab.smartblocklab.com/smartcontracts/common/function/remote/marketaccount
&&
govendor update gitlab.smartblocklab.com/smartcontracts/common/interfaces/imarket
&&
govendor update gitlab.smartblocklab.com/smartcontracts/common/interfaces/imarketaccount
&&
govendor update gitlab.smartblocklab.com/smartcontracts/common/model/market
&&
govendor update gitlab.smartblocklab.com/smartcontracts/common/model/marketaccount
&&
govendor update gitlab.smartblocklab.com/smartcontracts/common/security/tools
&&
govendor update gitlab.smartblocklab.com/smartcontracts/common/security/actions
&&
govendor update gitlab.smartblocklab.com/smartcontracts/common/security/checker
&&
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help