@@ -192,7 +192,7 @@ import klyIndexer from '@/lib/nodes/kly-indexer'
192
192
import { AllNodesDisabledError , AllNodesOfflineError , NoInternetConnectionError } from ' @/lib/nodes/utils/errors'
193
193
import { PendingTransactionError } from ' @/lib/pending-transactions'
194
194
import axios from ' axios'
195
- import { nextTick } from ' vue'
195
+ import { computed , nextTick } from ' vue'
196
196
197
197
import QrcodeCapture from ' @/components/QrcodeCapture.vue'
198
198
import QrcodeScannerDialog from ' @/components/QrcodeScannerDialog.vue'
@@ -233,6 +233,7 @@ import { AllCryptos } from '@/lib/constants/cryptos'
233
233
import { MAX_UINT64 } from ' @klayr/validator'
234
234
235
235
import { mdiDotsVertical , mdiMenuDown } from ' @mdi/js'
236
+ import { useStore } from ' vuex'
236
237
237
238
238
239
/**
@@ -284,7 +285,16 @@ export default {
284
285
},
285
286
emits: [' send' , ' error' ],
286
287
setup () {
288
+ const store = useStore ()
289
+
290
+ const isOnline = computed (() => store .getters [' isOnline' ])
291
+
292
+ const checkIsOnline = () => {
293
+ return navigator .onLine || isOnline .value ;
294
+ }
295
+
287
296
return {
297
+ checkIsOnline,
288
298
mdiDotsVertical,
289
299
mdiMenuDown
290
300
}
@@ -804,7 +814,7 @@ export default {
804
814
})
805
815
},
806
816
async sendFunds () {
807
- if (! navigator . onLine ) {
817
+ if (! this . checkIsOnline () ) {
808
818
throw new NoInternetConnectionError ()
809
819
}
810
820
0 commit comments