Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ci #435

Merged
merged 17 commits into from
Sep 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .env.production
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ VUE_APP_MODE=production
VUE_APP_SENTRY_SAMPLE_RATE=0.95
VUE_APP_SENTRY_DSN=https://[email protected]/6125850
VUE_APP_SOLANA_BUILD_VERSION=0.1
VUE_APP_GA_ID=G-RCNKR0V6N2
VUE_APP_GA_ID=GTM-RCNKR0V6N2
VUE_APP_DEVELOPER_DASHBOARD_URL="https://api.developer.tor.us"
VUE_APP_IMGPROXY_URL=https://img-cdn.magiceden.dev
# this signature is for solana.tor.us
Expand Down
2 changes: 1 addition & 1 deletion .env.testing
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ STATE_DOMAIN=https://solana-openlogin-state.tor.us
VUE_APP_SENTRY_SAMPLE_RATE=0.95
VUE_APP_SENTRY_DSN=https://[email protected]/6125850
VUE_APP_SOLANA_BUILD_VERSION=0.1
VUE_APP_GA_ID=G-LQ8G005HR9
VUE_APP_GA_ID=GTM-LQ8G005HR9
BROWSERSTACK_USERNAME=
BROWSERSTACK_ACCESS_KEY=
VUE_APP_DEVELOPER_DASHBOARD_URL="https://api.developer.tor.us"
Expand Down
85 changes: 85 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
"@toruslabs/openlogin": "^4.7.0",
"@toruslabs/openlogin-ed25519": "^2.0.0",
"@toruslabs/openlogin-jrpc": "^4.7.0",
"@toruslabs/openlogin-utils": "^4.7.0",
"@toruslabs/openlogin-subkey": "^4.2.0",
"@toruslabs/openlogin-utils": "^4.7.0",
"@toruslabs/solana-controllers": "^3.0.3",
"@toruslabs/tweetnacl-js": "^1.0.4",
"@toruslabs/vue-components": "^2.0.1",
Expand All @@ -64,6 +64,7 @@
"json-stable-stringify": "^1.0.2",
"lodash-es": "^4.17.21",
"loglevel": "^1.8.1",
"node-fetch": "^3.3.2",
"pump": "^3.0.0",
"qr-scanner": "^1.4.2",
"readable-stream": "^4.4.2",
Expand Down
6 changes: 3 additions & 3 deletions src/components/TokenBalance.vue
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<script setup lang="ts">
import { significantDigits } from "@toruslabs/base-controllers";
import { computed, ref, watch } from "vue";
import { useI18n } from "vue-i18n";

import { Card, NetworkDisplay } from "@/components/common";
import ControllerModule from "@/modules/controllers";
// import { i18n } from "@/plugins/i18nPlugin";
import { SolAndSplToken } from "@/utils/interfaces";

const { t } = useI18n();
// const { t } = i18n.global;

const props = defineProps<{
selectedToken?: Partial<SolAndSplToken>;
Expand Down Expand Up @@ -42,7 +42,7 @@ watch(
<Card>
<div class="flex w-full justify-between items-center">
<div class="font-header font-semibold text-app-text-600 dark:text-app-text-dark-500">
{{ t("walletHome.totalValue") }}
{{ $t("walletHome.totalValue") }}
</div>
<NetworkDisplay />
</div>
Expand Down
11 changes: 6 additions & 5 deletions src/components/WalletBalance.vue
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
<script setup lang="ts">
import { LoadingState } from "@toruslabs/solana-controllers";
import { computed } from "vue";
import { useI18n } from "vue-i18n";
import { useRouter } from "vue-router";

import { Button, Card, CurrencySelector, NetworkDisplay } from "@/components/common";
import { GeneralInteractions, HomePageInteractions, trackUserClick } from "@/directives/google-analytics";
import ControllerModule from "@/modules/controllers";
// import { i18n } from "@/plugins/i18nPlugin";
import { isTopupHidden } from "@/utils/whitelabel";

const { t } = useI18n();
// const { t } = i18n.global;

const isCurrencyRateUpdate = computed(() => ControllerModule.isCurrencyRateUpdate);
const isSplTokenLoading = computed(() => ControllerModule.isSplTokenLoading);

Expand Down Expand Up @@ -37,7 +38,7 @@ const updateCurrency = (newCurrency: string) => {
<Card :height="showButtons ? '164px' : undefined">
<div class="flex w-full justify-between items-center">
<div class="font-header font-semibold text-app-text-600 dark:text-app-text-dark-500">
{{ t("walletHome.totalValue") }}
{{ $t("walletHome.totalValue") }}
</div>
<NetworkDisplay />
</div>
Expand Down Expand Up @@ -71,15 +72,15 @@ const updateCurrency = (newCurrency: string) => {
variant="tertiary"
class="w-full mr-3 text-app-primary-500"
@click="router.push('/wallet/topup')"
>{{ t("walletHome.topUp") }}</Button
>{{ $t("walletHome.topUp") }}</Button
>
<Button
v-ga="HomePageInteractions.TRANSFER"
:block="true"
variant="tertiary"
class="w-full text-app-primary-500"
@click="router.push('/wallet/transfer')"
>{{ t("walletHome.transfer") }}</Button
>{{ $t("walletHome.transfer") }}</Button
>
</div>
</template>
Expand Down
8 changes: 3 additions & 5 deletions src/components/WalletTabs.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<script setup lang="ts">
import { computed, ref } from "vue";
import { useI18n } from "vue-i18n";

import SolanaLogoURL from "@/assets/solana-dark.svg";
import SolanaLightLogoURL from "@/assets/solana-light.svg";
Expand All @@ -26,7 +25,6 @@ const props = withDefaults(
}
);

const { t } = useI18n();
const tabs = ref(NAVIGATION_LIST);
const user = computed(() => ControllerModule.torus.userInfo);
const selectedAddress = computed(() => ControllerModule.torus.selectedAddress);
Expand Down Expand Up @@ -62,7 +60,7 @@ const logout = async () => {
value.navHidden && 'hidden',
]"
:aria-current="key === tab ? 'page' : undefined"
>{{ t(value.name) }}</router-link
>{{ $t(value.name) }}</router-link
>
</div>
</div>
Expand All @@ -79,7 +77,7 @@ const logout = async () => {
<header v-if="props.showHeader">
<div class="flex items-center max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 flex-wrap">
<h1 class="text-xl sm:text-3xl font-medium leading-tight text-app-text-500 dark:text-app-text-dark-400">
{{ t(tabs[tab]?.title) || "" }}
{{ $t(tabs[tab]?.title) || "" }}
</h1>
<div class="grow flex">
<div id="rightPanel" class="w-full" />
Expand Down Expand Up @@ -117,7 +115,7 @@ const logout = async () => {
class="text-xs text-center leading-none mt-1"
:class="[key === tab ? (ControllerModule.isDarkMode ? 'item-white' : 'item-black') : 'item-gray opacity-90']"
>
{{ t(value.name) || "" }}
{{ $t(value.name) || "" }}
</p>
</div>
</router-link>
Expand Down
13 changes: 5 additions & 8 deletions src/components/activity/ActivityItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { ACTIVITY_STATUS_CANCELLED, ACTIVITY_STATUS_SUCCESSFUL, ACTIVITY_STATUS_
import { SolanaTransactionActivity } from "@toruslabs/solana-controllers";
import dateFormat from "dateformat";
import { computed } from "vue";
import { useI18n } from "vue-i18n";

import SolanaLogoDark from "@/assets/solana-logo-shaded.png";
import SolanaLogoLight from "@/assets/solana-logo-shaded-light.png";
Expand All @@ -17,8 +16,6 @@ const props = defineProps<{
// const selectedNetworkDisplayName = computed(() => ControllerModule.selectedNetworkDisplayName);
// const showDetails = ref(false);

const { t } = useI18n();

const openExplorerLink = (link: string) => {
trackUserClick(ActivityPageInteractions.ACTIVITY_DETAIL + link);
window.open(link, "_blank");
Expand Down Expand Up @@ -68,16 +65,16 @@ const amountIsVisible = computed(() => {
</div>
<div class="text-left ml-4 break-words overflow-hidden">
<div v-if="activity.type === 'unknown'" class="text-xs font-medium text-app-text-600 dark:text-app-text-dark-600">
{{ t("walletActivity.unknown") }}
{{ $t("walletActivity.unknown") }}
</div>
<!-- Transfer Instruction -->
<div v-if="['transfer', 'transferChecked'].includes(activity.type)">
<div class="text-xs font-medium text-app-text-600 dark:text-app-text-dark-600">
{{ activity.send ? t("walletActivity.sent") : t("walletActivity.received") }} {{ " " }} {{ Number(activity.totalAmountString) }}
{{ activity.send ? $t("walletActivity.sent") : $t("walletActivity.received") }} {{ " " }} {{ Number(activity.totalAmountString) }}
{{ activity.cryptoCurrency }}

<span v-if="activity.cryptoCurrency === 'SOL'" class="text-xxs text-app-text-400 dark:text-app-text-dark-600"
>{{ activity.send ? t("walletActivity.to") : t("walletActivity.from") }} {{ " " }}</span
>{{ activity.send ? $t("walletActivity.to") : $t("walletActivity.from") }} {{ " " }}</span
>
</div>
<div v-if="activity.cryptoCurrency === 'SOL'" class="text-xs text-app-text-400 dark:text-app-text-dark-600 break-words">
Expand All @@ -90,7 +87,7 @@ const amountIsVisible = computed(() => {
Burnt {{ Number(activity.totalAmountString) }} {{ activity.cryptoCurrency }}

<span v-if="activity.cryptoCurrency === 'SOL'" class="text-xxs text-app-text-400 dark:text-app-text-dark-600"
>{{ activity.send ? t("walletActivity.to") : t("walletActivity.from") }} {{ " " }}</span
>{{ activity.send ? $t("walletActivity.to") : $t("walletActivity.from") }} {{ " " }}</span
>
</div>
<div v-if="activity.cryptoCurrency === 'SOL'" class="text-xs text-app-text-400 dark:text-app-text-dark-600 break-words">
Expand Down Expand Up @@ -122,7 +119,7 @@ const amountIsVisible = computed(() => {
<!-- status -->
<div class="col-span-4 text-right order-4 flex items-center justify-end sm:col-span-2" :class="{ 'sm:col-span-4': !amountIsVisible }">
<div class="rounded-xl inline-block bg-green-300 text-xs text-center py-1 px-5" :style="{ backgroundColor: getTxStatusColor(activity.status) }">
{{ t(`walletActivity.${activity.status}`) }}
{{ $t(`walletActivity.${activity.status}`) }}
</div>
</div>
</div>
Expand Down
5 changes: 1 addition & 4 deletions src/components/burnNFT/BurnNFT.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import { Dialog, DialogOverlay, DialogTitle, TransitionChild, TransitionRoot } from "@headlessui/vue";
import { NFTInfo } from "@toruslabs/solana-controllers";
import { ref } from "vue";
import { useI18n } from "vue-i18n";

import FallbackNft from "@/assets/fallback-nft.svg";
import { Button } from "@/components/common";
Expand All @@ -29,8 +28,6 @@ const props = withDefaults(
}
);

const { t } = useI18n();

const emits = defineEmits(["transferConfirm", "transferReject", "onCloseModal"]);

const closeModal = () => {
Expand Down Expand Up @@ -88,7 +85,7 @@ const refDiv = ref(null);
</div>
<div class="flex flex-row items-center my-6 mx-3">
<Button class="flex-auto mx-2 w-1/2" :block="true" variant="tertiary" @click="onCancel">
{{ t("walletTransfer.cancel") }}
{{ $t("walletTransfer.cancel") }}
</Button>
<button
type="button"
Expand Down
5 changes: 1 addition & 4 deletions src/components/common/ComboBox.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<script setup lang="ts">
import { ErrorObject } from "@vuelidate/core";
import { computed, ref } from "vue";
import { useI18n } from "vue-i18n";

type ItemType = { text: string; value: string };

Expand Down Expand Up @@ -33,8 +32,6 @@ const filteredItems = computed(() => {
});
});

const { t } = useI18n();

const setSelectedItem = (item: ItemType) => {
value.value = item.value;
isListOpen.value = false;
Expand All @@ -51,7 +48,7 @@ const onBlur = () => {
<div class="flex flex-col">
<div v-show="filteredItems.length > 0 && isListOpen" class="absolute inset-0 z-0" @click="isListOpen = false" @keydown="isListOpen = false"></div>

<div class="text-sm mb-1 text-app-text-600 dark:text-app-text-dark-500">{{ t("walletActivity.sendTo") }}</div>
<div class="text-sm mb-1 text-app-text-600 dark:text-app-text-dark-500">{{ $t("walletActivity.sendTo") }}</div>
<input
v-model="value"
type="text"
Expand Down
2 changes: 1 addition & 1 deletion src/components/common/CurrencySelector.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const props = defineProps<{
token: string;
}>();

const currencies = computed(() => supportedCurrencies(props.token.toUpperCase()));
const currencies = computed(() => supportedCurrencies());
const emits = defineEmits(["onChange"]);

const value = computed({
Expand Down
Loading
Loading