UNPKG

@oko-wallet/oko-sdk-cosmos

Version:
25 lines 722 B
import { v4 as uuidv4 } from "uuid"; export async function openModal(data) { const modal_id = uuidv4(); const openModalMsg = { target: "oko_attached", msg_type: "open_modal", payload: { modal_type: "cosmos/make_signature", modal_id, data, }, }; try { const modalResult = await this.okoWallet.openModal(openModalMsg); if (!modalResult.success) { throw new Error("modal result not success"); } this.okoWallet.closeModal(); return modalResult.data; } catch (err) { throw new Error(`Error getting modal response, err: ${err}`); } } //# sourceMappingURL=open_modal.js.map