Skip to content

Commit b5aeb44

Browse files
committed
amp: send/pfb/connect/disconnect/errors
1 parent c808714 commit b5aeb44

3 files changed

Lines changed: 21 additions & 0 deletions

File tree

components/Connection.vue

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import Tooltip from "@/components/ui/Tooltip.vue"
66
import { Dropdown, DropdownItem, DropdownDivider } from "@/components/ui/Dropdown"
77
88
/** Services */
9+
import amp from "@/services/amp"
910
import { suggestChain, getAccounts, disconnect } from "@/services/keplr"
1011
import { arabica, mocha, mainnet } from "@/services/chains"
1112
@@ -76,7 +77,11 @@ const handleConnect = async () => {
7677
getBalance()
7778
7879
isFetchingAccounts.value = false
80+
81+
amp.log("connect")
7982
} catch (error) {
83+
amp.log("rejectConnect")
84+
8085
switch (error.message) {
8186
case "Request rejected":
8287
notificationsStore.create({
@@ -109,6 +114,8 @@ const handleCopy = (target) => {
109114
const handleDisconnect = () => {
110115
disconnect()
111116
117+
amp.log("disconnect")
118+
112119
account.value = null
113120
appStore.address = ""
114121
appStore.balance = 0

components/modals/PayForBlobModal.vue

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import Button from "@/components/ui/Button.vue"
88
import { fetchEstimatedGas } from "@/services/api/gas"
99
1010
/** Services */
11+
import amp from "@/services/amp"
1112
import { getNamespaceID } from "@/services/utils"
1213
import { sendPayForBlob } from "@/services/keplr"
1314
import { prepareBlob } from "@/services/utils/encode"
@@ -69,6 +70,8 @@ watch(
6970
() => props.show,
7071
async () => {
7172
if (props.show) {
73+
amp.log("showPfbModal")
74+
7275
if (!appStore.address?.length) {
7376
warningBannerText.value = "Keplr wallet connection is required to submit a blob."
7477
} else if (hostname !== "celenium.io") {
@@ -156,6 +159,8 @@ const handleContinue = async () => {
156159
await sendPayForBlob(appStore.network, appStore.address, proto, stdFee, decodableBlob)
157160
isAwaiting.value = false
158161
162+
amp.log("successfullPfb")
163+
159164
notificationsStore.create({
160165
notification: {
161166
type: "success",
@@ -169,6 +174,8 @@ const handleContinue = async () => {
169174
} catch (e) {
170175
isAwaiting.value = false
171176
177+
amp.log("failedPfb")
178+
172179
if (e.message.startsWith("Request rejected")) {
173180
notificationsStore.create({
174181
notification: {

components/modals/SendModal.vue

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import Button from "@/components/ui/Button.vue"
1212
import { search } from "@/services/api/search"
1313
1414
/** Services */
15+
import amp from "@/services/amp"
1516
import { normalizeAmount, purgeNumber, comma } from "@/services/utils/amounts"
1617
import { simulateMsgs, sendMsgs } from "@/services/keplr"
1718
import { MsgSend } from "@/services/proto/gen/msg_send"
@@ -193,6 +194,8 @@ watch(
193194
() => props.show,
194195
async () => {
195196
if (props.show) {
197+
amp.log("showSendModal")
198+
196199
if (!appStore.address?.length) {
197200
warningBannerText.value = "Keplr wallet connection is required to send TIA."
198201
} else if (hostname !== "celenium.io") {
@@ -255,6 +258,8 @@ const handleContinue = async () => {
255258
await sendMsgs(appStore.network, key.bech32Address, proto, stdFee)
256259
isAwaiting.value = false
257260
261+
amp.log("successfullSend")
262+
258263
notificationsStore.create({
259264
notification: {
260265
type: "success",
@@ -268,6 +273,8 @@ const handleContinue = async () => {
268273
} catch (e) {
269274
isAwaiting.value = false
270275
276+
amp.log("failedSend")
277+
271278
if (e.message.startsWith("Request rejected")) {
272279
notificationsStore.create({
273280
notification: {

0 commit comments

Comments
 (0)