FIX - stabilize VaultX wallet key actions

Keep copy and share labels contained inside the profile card and cover partial locale payloads with a regression test.
This commit is contained in:
smx.pusha
2026-08-18 12:16:57 +02:00
parent efa1ae523c
commit d4e5526d16
2 changed files with 25 additions and 2 deletions
+12
View File
@@ -70,6 +70,18 @@ describe('phone locale fallback', () => {
expect(phone.t('Apps.messages.seekAudio')).toBe('Seek Audio') expect(phone.t('Apps.messages.seekAudio')).toBe('Seek Audio')
}) })
it('keeps VaultX wallet key actions translated with a partial server locale', () => {
const phone = usePhoneStore()
phone.open({ locales: { Apps: { crypto: { name: 'VaultX' } } } })
expect(phone.t('Apps.crypto.profile.walletKey')).toBe('Public crypto key')
expect(phone.t('Apps.crypto.profile.walletKeyBody')).toBe(
'Share this key to receive crypto. It cannot access your account.',
)
expect(phone.t('Apps.crypto.profile.copyKey')).toBe('Copy')
expect(phone.t('Apps.crypto.profile.shareKey')).toBe('Share')
})
it('uses the English Lua payload before the bundled emergency fallback', () => { it('uses the English Lua payload before the bundled emergency fallback', () => {
const phone = usePhoneStore() const phone = usePhoneStore()
phone.open({ phone.open({
+13 -2
View File
@@ -1449,10 +1449,12 @@ onMounted(() => void crypto.load())
<SkyButton variant="secondary" tonal @click="copyWalletKey"> <SkyButton variant="secondary" tonal @click="copyWalletKey">
<CheckCircle2 v-if="walletKeyCopied" :size="16" /> <CheckCircle2 v-if="walletKeyCopied" :size="16" />
<Copy v-else :size="16" /> <Copy v-else :size="16" />
{{ t(walletKeyCopied ? 'profile.copied' : 'profile.copyKey') }} <span>{{
t(walletKeyCopied ? 'profile.copied' : 'profile.copyKey')
}}</span>
</SkyButton> </SkyButton>
<SkyButton @click="shareWalletKey"> <SkyButton @click="shareWalletKey">
<Share2 :size="16" />{{ t('profile.shareKey') }} <Share2 :size="16" /><span>{{ t('profile.shareKey') }}</span>
</SkyButton> </SkyButton>
</div> </div>
</SkyCard> </SkyCard>
@@ -3730,13 +3732,22 @@ onMounted(() => void crypto.load())
gap: 7px; gap: 7px;
} }
.wallet-key-card__actions :deep(.sky-button) { .wallet-key-card__actions :deep(.sky-button) {
width: 100%;
min-width: 0;
min-height: 42px; min-height: 42px;
gap: 6px; gap: 6px;
padding: 0 10px; padding: 0 10px;
overflow: hidden;
font-size: 11px; font-size: 11px;
font-weight: 800; font-weight: 800;
border-radius: 13px; border-radius: 13px;
} }
.wallet-key-card__actions :deep(.sky-button > span) {
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.profile-stats--premium { .profile-stats--premium {
margin-top: 10px; margin-top: 10px;
} }