@keplr-ewallet/ewallet-sdk-cosmos
Version:
22 lines • 620 B
JavaScript
import { v4 as uuidv4 } from "uuid";
export async function openModal(data) {
const modal_id = uuidv4();
const openModalMsg = {
target: "keplr_ewallet_attached",
msg_type: "open_modal",
payload: {
modal_type: "cosmos/make_signature",
modal_id,
data,
},
};
try {
const modalResult = await this.eWallet.openModal(openModalMsg);
this.eWallet.closeModal();
return modalResult;
}
catch (err) {
throw new Error(`Error getting modal response, err: ${err}`);
}
}
//# sourceMappingURL=open_modal.js.map