UNPKG

@provenanceio/wallet-utils

Version:

Typescript Utilities for Provenance Blockchain Wallet

33 lines (30 loc) 961 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.msgInstantiateContract2 = void 0; var decoder = new TextDecoder('utf-8'); /** * Formats MsgInstantiateContract2 messages for display * @param message of type MsgInstantiateContract2 * @returns object with MsgInstantiateContract2 fields */ var msgInstantiateContract2 = function msgInstantiateContract2(message) { return { typeName: 'MsgInstantiateContract', sender: message.getSender(), admin: message.getAdmin(), codeId: message.getCodeId(), label: message.getLabel(), msg: JSON.parse(decoder.decode(message.getMsg())), salt: JSON.parse(decoder.decode(message.getSalt())), fixMsg: message.getFixMsg(), fundsList: message.getFundsList().map(function (coin) { return { denom: coin.getDenom(), amount: Number(coin.getAmount()) }; }) }; }; exports.msgInstantiateContract2 = msgInstantiateContract2;