Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[R4R] BEP39 - add memo to transfer kafka message #638

Merged
merged 1 commit into from
Aug 12, 2019
Merged

[R4R] BEP39 - add memo to transfer kafka message #638

merged 1 commit into from
Aug 12, 2019

Conversation

ackratos
Copy link
Contributor

@ackratos ackratos commented Aug 4, 2019

Description

add memo to transfer kafka message

Document:
https://github.com/binance-chain/docs-site/pull/151
Websocket:
https://github.com/binance-chain/websocket-ap/pull/101

Rationale

BEP39

Example

 /Users/zhaocong/go/src/github.com/binance-chain/node/build/bnbcli send --amount 1000000:BNB --to bnb12lu3cs95afx3x222uyr58kfx3mq3wdw2h0t8gx --from zc --chain-id test-chain-n4b735 --memo "1234"
{  
   "stream":"transfers",
   "data":{  
      "e":"outboundTransferInfo",
      "E":1122,
      "H":"3251F90C832B17E5C58F8A06B9BA6757AA168E5BF2CEE5A10EB5AE6313EF9655",
      "M":"1234",
      "f":"bnb15ev5gmsvmwsd93zm837d277u8lr7avdcfe5ntc",
      "t":[  
         {  
            "o":"bnb12lu3cs95afx3x222uyr58kfx3mq3wdw2h0t8gx",
            "c":[  
               {  
                  "a":"BNB",
                  "A":"0.01000000"
               }
            ]
         }
      ]
   }
}

Changes

Notable changes:

  • add each change in a bullet point here
  • ...

Preflight checks

  • build passed (make build)
  • tests passed (make test)
  • integration tests passed (make integration_test)
  • manual transaction test passed (cli invoke)

Already reviewed by

...

Related issues

... reference related issue #'s here ...

msgs := t.GetMsgs()
for _, m := range msgs {
msg, ok := m.(bank.MsgSend)
if !ok {
continue
}
var memo string
if stdTx, ok := t.(auth.StdTx); ok {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

memo is in the tx level, you can get the memo outside the for loop. Also, you can merge the two force conversion into one

t := value.(sdk.Tx) and stdTx, ok := t.(auth.StdTx)

@ackratos ackratos merged commit 932cde3 into develop Aug 12, 2019
This was referenced Aug 12, 2019
@unclezoro unclezoro deleted the bep39 branch May 10, 2022 06:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants