fromAmino static method

MsgTransfer fromAmino(
  1. MsgTransferAminoArgs data
)

Implementation

static MsgTransfer fromAmino(MsgTransferAminoArgs data) {
  if (data.value.timeout_Height == null &&
      data.value.timeout_Timestamp == null) {
    throw Exception(
        "both of timeout_height and timeout_timestamp are undefined");
  }

  return MsgTransfer(
      data.value.source_Port!,
      data.value.source_Channel!,
      Coin.fromAmino(data.value.token!),
      data.value.sender!,
      data.value.receiver!,
      Height.fromAmino(data.value.timeout_Height!),
      double.parse(data.value.timeout_Timestamp!));
}