refactor: move copyText and formatBalance into utils (#3584)

This commit is contained in:
dni ⚡
2025-11-27 12:23:42 +01:00
committed by GitHub
parent 9c257aa23d
commit e6ca8a33c6
9 changed files with 53 additions and 24 deletions
+7
View File
@@ -95,6 +95,8 @@ window.i18n = new VueI18n.createI18n({
window.app.mixin({
data() {
return {
api: window._lnbitsApi,
utils: window._lnbitsUtils,
g: window.g,
utils: window._lnbitsUtils,
...WINDOW_SETTINGS
@@ -107,6 +109,11 @@ window.app.mixin({
const isVueRoute = matchedRoute?.matched?.length > 0
return isVueRoute
}
},
// backwards compatibility for extensions, should not be used in the future
methods: {
copyText: window._lnbitsUtils.copyText,
formatBalance: window._lnbitsUtils.formatBalance
}
})