diff --git a/frontend/src/components/crypto/CryptoLogo.vue b/frontend/src/components/crypto/CryptoLogo.vue new file mode 100644 index 0000000..84874c0 --- /dev/null +++ b/frontend/src/components/crypto/CryptoLogo.vue @@ -0,0 +1,270 @@ + + + + + diff --git a/frontend/src/views/apps/CryptoApp.contract.test.ts b/frontend/src/views/apps/CryptoApp.contract.test.ts index 4364c3b..8fdca42 100644 --- a/frontend/src/views/apps/CryptoApp.contract.test.ts +++ b/frontend/src/views/apps/CryptoApp.contract.test.ts @@ -3,6 +3,10 @@ import { readFileSync } from 'node:fs' import { describe, expect, it } from 'vitest' const source = readFileSync(new URL('./CryptoApp.vue', import.meta.url), 'utf8') +const logoSource = readFileSync( + new URL('../../components/crypto/CryptoLogo.vue', import.meta.url), + 'utf8', +) const server = readFileSync( new URL('../../../../sky_phone/source/server/crypto.lua', import.meta.url), 'utf8', @@ -94,7 +98,21 @@ describe('VaultX crypto app contracts', () => { expect(cryptoConfig.match(/\n\s+Id = "/g)).toHaveLength(24) expect(cryptoConfig.match(/\n\s+Logo = "/g)).toHaveLength(24) expect(server).toContain('logo = config.Logo') - expect(source).toContain('detail.logo') + expect(source).toContain(' { diff --git a/frontend/src/views/apps/CryptoApp.vue b/frontend/src/views/apps/CryptoApp.vue index 2495f28..f38b23b 100644 --- a/frontend/src/views/apps/CryptoApp.vue +++ b/frontend/src/views/apps/CryptoApp.vue @@ -20,6 +20,7 @@ import { X, } from 'lucide-vue-next' import { computed, onMounted, ref, watch } from 'vue' +import CryptoLogo from '@/components/crypto/CryptoLogo.vue' import { useCryptoStore } from '@/stores/crypto' import { usePhoneStore } from '@/stores/phone' import type { CryptoMarket, CryptoSide } from '@/types/crypto' @@ -413,7 +414,7 @@ onMounted(() => void crypto.load()) {{ t('name') }} - {{ detail.logo }} +