Skip to content

Commit

Permalink
Merge branch 'dev' of https://github.com/Multy-io/Multy-back into MUL…
Browse files Browse the repository at this point in the history
…-1794_EOS
  • Loading branch information
vovapi committed Jul 30, 2018
2 parents 95b81e5 + 9e7cf01 commit 98f0bf7
Show file tree
Hide file tree
Showing 18 changed files with 5 additions and 8,126 deletions.
5 changes: 2 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,12 @@ RUN apt-get update && \
apt-get install -y protobuf-compiler

RUN cd $GOPATH/src/github.com/Multy-io && \
rm -rf Multy-back && \
rm -r Multy-back && \
git clone https://github.com/Multy-io/Multy-back.git && \
go get github.com/swaggo/gin-swagger && \
cd Multy-back && \
cd $GOPATH/src/github.com/Multy-io/Multy-back && \
git checkout dev && \
git pull origin dev
# rm -r ./vendor/github.com/golang/protobuf/proto

RUN cd $GOPATH/src/github.com/Multy-io/Multy-back && \
make build
Expand Down
2 changes: 1 addition & 1 deletion btc/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ func setGRPCHandlers(cli pb.NodeCommuunicationsClient, nsqProducer *nsq.Producer
}
}

log.Infof("New tx history in- %v out-%v\n", tx.WalletsInput, tx.WalletsOutput)
log.Infof("New tx history in: %v out: %v", tx.WalletsInput, tx.WalletsOutput)

err = saveMultyTransaction(tx, networkID, gTx.Resync)
if err != nil {
Expand Down
8 changes: 2 additions & 6 deletions client/firebase.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,21 +112,17 @@ func InitFirebaseConn(conf *FirebaseConf, c *gin.Engine, nsqAddr string) (*Fireb
Topic: topic,
}

fClient.log.Errorf("\n\n msg %v \n", msg)
fClient.log.Errorf("\n\n MessageToSend : %v\n\n", messageToSend)

ctx := context.Background()
client, err := service.Messaging(ctx)
if err != nil {
fClient.log.Errorf("service.Messaging: %v", err.Error())
}

response, err := client.Send(ctx, messageToSend)
_, err = client.Send(ctx, messageToSend)
if err != nil {
fClient.log.Errorf("client.Send : %v", err.Error())
}

fClient.log.Errorf("\n\nFirebase push resp : %v\n\n", response)
fClient.log.Debugf("push to user: %v", msg.UserID)
}

return nil
Expand Down
11 changes: 0 additions & 11 deletions client/rest.go
Original file line number Diff line number Diff line change
Expand Up @@ -1479,7 +1479,6 @@ func (restClient *RestClient) getWalletVerbose() gin.HandlerFunc {

totalBalance = amount.GetBalance()
pendingBalance = amount.GetPendingBalance()
restClient.log.Warnf("\n Incoming node balance %v node pending balance %v", totalBalance, pendingBalance)

if totalBalance == pendingBalance {
pendingBalance = "0"
Expand All @@ -1504,19 +1503,15 @@ func (restClient *RestClient) getWalletVerbose() gin.HandlerFunc {
inTxAmount, _ := new(big.Int).SetString(tx.Amount, 10)
pendingBalanceBig := pendingBalanceBig.Add(pendingBalanceBig, inTxAmount)
pendingBalance = pendingBalanceBig.String()
restClient.log.Warnf("\n Incoming Wallet name %v pending fake balance %v", wallet.WalletName, pendingBalance)
}
if tx.Status == store.TxStatusAppearedInMempoolOutcoming && amount.GetBalance() == amount.GetPendingBalance() {
pendingBalanceBigOld := pendingBalanceBig
outTxAmount, _ := new(big.Int).SetString(tx.Amount, 10)
pendingBalanceBig := pendingBalanceBig.Sub(pendingBalanceBig, outTxAmount)
gasLimit := big.NewInt(tx.GasLimit)
gasPrice := big.NewInt(tx.GasPrice)
fee := new(big.Int).Mul(gasLimit, gasPrice)
pendingBalanceBig = pendingBalanceBig.Sub(pendingBalanceBig, fee)
pendingBalance = pendingBalanceBig.String()
restClient.log.Warnf("%v - %v - %v = %v", pendingBalanceBigOld, outTxAmount, fee, pendingBalanceBig)
restClient.log.Warnf("\n Outcoming Wallet name %v pending fake balance %v", wallet.WalletName, pendingBalance)
}
pending = true
}
Expand Down Expand Up @@ -1820,11 +1815,9 @@ func (restClient *RestClient) getAllWalletsVerbose() gin.HandlerFunc {
history = append(history, tx)
}
}
restClient.log.Warnf("\n Incoming node balance %v node pending balance %v", totalBalance, pendingBalance)

if totalBalance == pendingBalance {
pendingBalance = "0"
restClient.log.Warnf("\n ==")
}

walletNonce = nonce.GetNonce()
Expand All @@ -1840,19 +1833,15 @@ func (restClient *RestClient) getAllWalletsVerbose() gin.HandlerFunc {
inTxAmount, _ := new(big.Int).SetString(tx.Amount, 10)
pendingBalanceBig := pendingBalanceBig.Add(pendingBalanceBig, inTxAmount)
pendingBalance = pendingBalanceBig.String()
restClient.log.Warnf("\n Incoming Wallet name %v pending fake balance %v", wallet.WalletName, pendingBalance)
}
if tx.Status == store.TxStatusAppearedInMempoolOutcoming && amount.GetBalance() == amount.GetPendingBalance() {
pendingBalanceBigOld := pendingBalanceBig
outTxAmount, _ := new(big.Int).SetString(tx.Amount, 10)
pendingBalanceBig := pendingBalanceBig.Sub(pendingBalanceBig, outTxAmount)
gasLimit := big.NewInt(tx.GasLimit)
gasPrice := big.NewInt(tx.GasPrice)
fee := new(big.Int).Mul(gasLimit, gasPrice)
pendingBalanceBig = pendingBalanceBig.Sub(pendingBalanceBig, fee)
pendingBalance = pendingBalanceBig.String()
restClient.log.Warnf("%v - %v - %v = %v", pendingBalanceBigOld, outTxAmount, fee, pendingBalanceBig)
restClient.log.Warnf("\n Outcoming Wallet name %v pending fake balance %v", wallet.WalletName, pendingBalance)
}
pending = true
}
Expand Down
31 changes: 0 additions & 31 deletions vendor/github.com/golang/protobuf1/LICENSE

This file was deleted.

43 changes: 0 additions & 43 deletions vendor/github.com/golang/protobuf1/proto/Makefile

This file was deleted.

Loading

0 comments on commit 98f0bf7

Please sign in to comment.