Skip to content

Commit

Permalink
update combine
Browse files Browse the repository at this point in the history
  • Loading branch information
sahith-narahari committed Nov 10, 2020
1 parent a0657f8 commit 529f6b8
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions server/rosetta/services/construction.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func (sn SingleNetwork) ConstructionCombine(ctx context.Context, request *types.
copy(compressedPublicKey, cmp.SerializeCompressed())
pubKey := &secp256k1.PubKey{Key: compressedPublicKey}

accountInfo, err := sn.client.AccountInfo(ctx, sdk.AccAddress(compressedPublicKey).String(), nil)
accountInfo, err := sn.client.AccountInfo(ctx, sdk.AccAddress(pubKey.Address()).String(), nil)
if err != nil {
return nil, rosetta.ToRosettaError(err)
}
Expand Down Expand Up @@ -177,13 +177,16 @@ func (sn SingleNetwork) ConstructionParse(ctx context.Context, request *types.Co
}

txBldr, _ := TxConfig.WrapTxBuilder(rawTx)
addrs := txBldr.GetTx().GetSigners()

var accountIdentifierSigners []*types.AccountIdentifier
for _, addr := range addrs {
signer := &types.AccountIdentifier{
Address: addr.String(),
if request.Signed {
addrs := txBldr.GetTx().GetSigners()
for _, addr := range addrs {
signer := &types.AccountIdentifier{
Address: addr.String(),
}
accountIdentifierSigners = append(accountIdentifierSigners, signer)
}
accountIdentifierSigners = append(accountIdentifierSigners, signer)
}

return &types.ConstructionParseResponse{
Expand Down

0 comments on commit 529f6b8

Please sign in to comment.