Skip to content

Commit

Permalink
adding getInterchainAccount to onRecvPacket
Browse files Browse the repository at this point in the history
  • Loading branch information
seantking committed Jul 16, 2021
1 parent 00db346 commit 1ea9888
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions spec/app/ics-027-interchain-accounts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -241,10 +241,14 @@ function onRecvPacket(packet: Packet) {
InterchainAccountPacketData data = packet.data
const tx = deserialiseTx(packet.data.txBytes)
try {
const result = executeTx(tx)

executeTx(tx)

// Gets the interchain account address, and returns it to the controller chain
// This step is necessary in order for the controller chain to know the address of the registered interchain account
// We should only return the interchain account on packet sequence 1
const interchainAccount = getInterchainAccount(ctx, SourcePortId)
return Acknowledgement{
result: result
result: interchainAccount
}
} catch (e) {
// Return ack with error.
Expand Down

0 comments on commit 1ea9888

Please sign in to comment.