Skip to content

Commit 3d9fd79

Browse files
committed
style: Fix prettier and ESLint issues
1 parent f36c8b5 commit 3d9fd79

File tree

3 files changed

+27
-25
lines changed

3 files changed

+27
-25
lines changed

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
src/apis/agents
22
src/apis/subscriptions
3+
src/apis/tokens

src/pages/subscriptions/SubscriptionsLanding.vue

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,13 @@
5252
<div class="q-pa-md">
5353
<h3>Current subscription</h3>
5454
<q-card class="q-pa-md row">
55-
<p v-if="subscriptionsStore.subscriptions.length === 0">No subscriptions</p>
56-
<div v-for="subscription of subscriptionsStore.subscriptions" v-else :key="subscription.id">
57-
<p>type: {{ subscription.type }} <br /> Provider: {{ subscription.provider }}</p>
58-
</div>
55+
<p v-if="subscriptionsStore.subscriptions.length === 0">No subscriptions</p>
56+
<div v-for="subscription of subscriptionsStore.subscriptions" v-else :key="subscription.id">
57+
<p>
58+
type: {{ subscription.type }} <br />
59+
Provider: {{ subscription.provider }}
60+
</p>
61+
</div>
5962
</q-card>
6063
</div>
6164
<div class="q-pa-md">
@@ -64,8 +67,10 @@
6467
<q-card class="q-pa-md">
6568
<p v-if="apiKeysStore.accounts.length === 0">No api keys</p>
6669
<p v-else>
67-
<q-btn v-if="!apiKeysStore.showKeys" color="primary" @click="apiKeysStore.revealKeys()" >Reveal api keys</q-btn>
68-
<q-btn v-if="apiKeysStore.showKeys" color="primary" @click="apiKeysStore.hideKeys()">Hide api keys</q-btn>
70+
<q-btn v-if="!apiKeysStore.showKeys" color="primary" @click="apiKeysStore.revealKeys()"
71+
>Reveal api keys
72+
</q-btn>
73+
<q-btn v-if="apiKeysStore.showKeys" color="primary" @click="apiKeysStore.hideKeys()">Hide api keys</q-btn>
6974
<br /><br />
7075
<q-markup-table>
7176
<thead>
@@ -77,7 +82,7 @@
7782
</tr>
7883
</thead>
7984
<tbody>
80-
<tr v-for="api_account of apiKeysStore.accounts">
85+
<tr v-for="api_account of apiKeysStore.accounts" :key="api_account.sha1_token">
8186
<td class="text-left">{{ api_account.name }}</td>
8287
<td class="text-left">{{ api_account.sha1_token }}</td>
8388
<td class="text-left">
@@ -87,10 +92,9 @@
8792
</tr>
8893
</tbody>
8994
</q-markup-table>
90-
</p>
95+
</p>
9196
</q-card>
9297
</div>
93-
9498
</q-page>
9599
</template>
96100

src/stores/api_key.ts

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
11
import { defineStore } from 'pinia';
2-
import {
3-
TokenAccount,
4-
accountListAccountAddressListGet
5-
} from 'src/apis/tokens'
2+
import { TokenAccount, accountListAccountAddressListGet } from 'src/apis/tokens';
63
import { useAccountStore } from 'stores/account';
74

85
type ApiKeyState = {
96
accounts: TokenAccount[];
10-
revealMessage: string|undefined;
11-
revealMessageSignature: string|undefined;
7+
revealMessage: string | undefined;
8+
revealMessageSignature: string | undefined;
129
isLoaded: boolean;
1310
showKeys: boolean;
1411
};
@@ -23,7 +20,7 @@ export const useApiKeyStore = defineStore('api_keys', {
2320
}),
2421
actions: {
2522
async load() {
26-
console.log("Loaded here");
23+
console.log('Loaded here');
2724
const { account } = useAccountStore();
2825

2926
if (account === null) {
@@ -36,8 +33,8 @@ export const useApiKeyStore = defineStore('api_keys', {
3633
},
3734
query: {
3835
chain: account.chain,
39-
reveal_message_signature: this.revealMessageSignature
40-
}
36+
reveal_message_signature: this.revealMessageSignature,
37+
},
4138
});
4239

4340
this.accounts = response.data?.accounts ?? [];
@@ -46,7 +43,7 @@ export const useApiKeyStore = defineStore('api_keys', {
4643
},
4744

4845
async revealKeys() {
49-
console.log("reveal keys", this.accounts, "n", this.revealMessage);
46+
console.log('reveal keys', this.accounts, 'n', this.revealMessage);
5047
if (this.revealMessageSignature) {
5148
this.load();
5249
this.showKeys = true;
@@ -55,26 +52,26 @@ export const useApiKeyStore = defineStore('api_keys', {
5552

5653
const { account, signMessage } = useAccountStore();
5754

58-
console.log("has account", account);
55+
console.log('has account', account);
5956
if (account === null || !this.revealMessage) {
6057
return;
6158
}
6259

6360
if (this.revealMessage != undefined) {
64-
console.log("Signing...");
61+
console.log('Signing...');
6562
const messageToSign = this.revealMessage;
6663
const hash = await signMessage(messageToSign);
6764
this.revealMessageSignature = hash;
68-
console.log("signed message", hash);
65+
console.log('signed message', hash);
6966
this.showKeys = true;
7067
}
7168
},
7269

7370
async hideKeys() {
7471
for (let account of this.accounts) {
75-
account.token = "**hidden**";
72+
account.token = '**hidden**';
7673
}
7774
this.showKeys = false;
78-
}
79-
}
75+
},
76+
},
8077
});

0 commit comments

Comments
 (0)