File tree 39 files changed +225
-84
lines changed
39 files changed +225
-84
lines changed Original file line number Diff line number Diff line change 11
11
</template >
12
12
13
13
<template #middle >
14
- <BalanceInfo :balance =" +account.balance" />
14
+ <BalanceInfo
15
+ :balance =" +account.balance"
16
+ :protocol =" PROTOCOL_AETERNITY"
17
+ />
15
18
</template >
16
19
17
20
<template #bottom >
Original file line number Diff line number Diff line change @@ -67,7 +67,6 @@ import {
67
67
import type { Protocol } from ' @/types' ;
68
68
import { getDefaultAccountLabel } from ' @/utils' ;
69
69
import { ProtocolAdapterFactory } from ' @/lib/ProtocolAdapterFactory' ;
70
- import { PROTOCOL_AETERNITY } from ' @/constants' ;
71
70
72
71
import Avatar from ' ./Avatar.vue' ;
73
72
import CopyText from ' ./CopyText.vue' ;
@@ -86,7 +85,7 @@ export default defineComponent({
86
85
props: {
87
86
address: { type: String , required: true },
88
87
name: { type: String , default: ' ' },
89
- protocol: { type: String as PropType <Protocol >, default: PROTOCOL_AETERNITY },
88
+ protocol: { type: String as PropType <Protocol >, required: true },
90
89
avatarSize: { type: String , default: ' lg' },
91
90
idx: { type: Number , default: 0 },
92
91
canCopyAddress: Boolean ,
Original file line number Diff line number Diff line change 46
46
<script lang="ts">
47
47
import { defineComponent , computed , PropType } from ' vue' ;
48
48
import type { Protocol } from ' @/types' ;
49
- import { PROTOCOL_AETERNITY } from ' @/constants' ;
50
49
51
50
import { ProtocolAdapterFactory } from ' @/lib/ProtocolAdapterFactory' ;
52
51
import AddressTruncated from ' ./AddressTruncated.vue' ;
@@ -73,7 +72,7 @@ export default defineComponent({
73
72
props: {
74
73
address: { type: String , required: true },
75
74
name: { type: String , default: ' ' },
76
- protocol: { type: String as PropType <Protocol >, default: PROTOCOL_AETERNITY },
75
+ protocol: { type: String as PropType <Protocol >, required: true },
77
76
size: {
78
77
type: String ,
79
78
default: ' rg' ,
Original file line number Diff line number Diff line change 20
20
/>
21
21
<TokenAmount
22
22
:amount =" balance"
23
- :symbol =" AE_SYMBOL"
23
+ :symbol =" tokenSymbol"
24
+ :protocol =" account.protocol"
24
25
fiat-below
25
26
class =" token-amount"
26
27
small
@@ -41,6 +42,7 @@ import { useBalances } from '@/composables';
41
42
import { getAddressColor } from ' @/utils' ;
42
43
import { AE_SYMBOL } from ' @/protocols/aeternity/config' ;
43
44
45
+ import { ProtocolAdapterFactory } from ' @/lib/ProtocolAdapterFactory' ;
44
46
import AccountInfo from ' ./AccountInfo.vue' ;
45
47
import BtnPlain from ' ./buttons/BtnPlain.vue' ;
46
48
import TokenAmount from ' ./TokenAmount.vue' ;
@@ -70,9 +72,14 @@ export default defineComponent({
70
72
: 0 ,
71
73
);
72
74
75
+ const tokenSymbol = computed (
76
+ () => ProtocolAdapterFactory .getAdapter (props .account .protocol ! ).getCoinSymbol (true ),
77
+ );
78
+
73
79
return {
74
80
balance ,
75
81
bgColorStyle ,
82
+ tokenSymbol ,
76
83
AE_SYMBOL ,
77
84
};
78
85
},
Original file line number Diff line number Diff line change @@ -33,7 +33,6 @@ import {
33
33
} from ' vue' ;
34
34
import type { Protocol } from ' @/types' ;
35
35
import { truncateAddress } from ' @/utils' ;
36
- import { PROTOCOL_AETERNITY } from ' @/constants' ;
37
36
import { ProtocolAdapterFactory } from ' @/lib/ProtocolAdapterFactory' ;
38
37
39
38
import ExternalLinkIcon from ' @/icons/external-link.svg?vue-component' ;
@@ -48,9 +47,9 @@ export default defineComponent({
48
47
},
49
48
props: {
50
49
address: { type: String , required: true },
50
+ protocol: { type: String as PropType <Protocol >, required: true },
51
51
showExplorerLink: Boolean ,
52
52
showProtocolIcon: Boolean ,
53
- protocol: { type: String as PropType <Protocol >, default: PROTOCOL_AETERNITY },
54
53
},
55
54
setup(props ) {
56
55
const truncatedAddress = computed (() => truncateAddress (props .address ));
Original file line number Diff line number Diff line change 2
2
<div class =" auction-overview" >
3
3
<DetailsItem :label =" $t('pages.auctionBid.current-highest-bid')" >
4
4
<template #value >
5
- <TokenAmount :amount =" amount" />
5
+ <TokenAmount
6
+ :amount =" amount"
7
+ :protocol =" PROTOCOL_AETERNITY"
8
+ />
6
9
</template >
7
10
</DetailsItem >
8
11
<DetailsItem
@@ -21,6 +24,7 @@ import { IAuction, IAuctionBid } from '@/types';
21
24
import { blocksToRelativeTime } from ' @/utils' ;
22
25
import { useTopHeaderData } from ' @/composables' ;
23
26
import { useGetter } from ' @/composables/vuex' ;
27
+ import { PROTOCOL_AETERNITY } from ' @/constants' ;
24
28
25
29
import DetailsItem from ' ./DetailsItem.vue' ;
26
30
import TokenAmount from ' ./TokenAmount.vue' ;
@@ -47,6 +51,7 @@ export default defineComponent({
47
51
const endHeight = computed (() => blocksToRelativeTime (blocksToExpiry .value ));
48
52
49
53
return {
54
+ PROTOCOL_AETERNITY ,
50
55
blocksToRelativeTime ,
51
56
auction ,
52
57
amount ,
Original file line number Diff line number Diff line change @@ -30,7 +30,6 @@ import {
30
30
import { useStore } from ' vuex' ;
31
31
import type { Protocol } from ' @/types' ;
32
32
import { useConnection , useCurrencies } from ' @/composables' ;
33
- import { PROTOCOL_AETERNITY } from ' @/constants' ;
34
33
import MainBalance from ' ./MainBalance.vue' ;
35
34
import MessageOffline from ' ./MessageOffline.vue' ;
36
35
@@ -41,7 +40,7 @@ export default defineComponent({
41
40
},
42
41
props: {
43
42
balance: { type: Number , required: true },
44
- protocol: { type: String as PropType <Protocol >, default: PROTOCOL_AETERNITY },
43
+ protocol: { type: String as PropType <Protocol >, required: true },
45
44
horizontalOfflineMessage: Boolean ,
46
45
},
47
46
setup(props ) {
Original file line number Diff line number Diff line change 23
23
:amount =" +tokenData.convertedBalance || 0"
24
24
:symbol =" tokenData.symbol"
25
25
:aex9 =" isTokenAeCoin"
26
+ :protocol =" PROTOCOL_AETERNITY"
26
27
dynamic-sizing
27
28
no-symbol
28
29
hide-fiat
@@ -97,6 +98,7 @@ export default defineComponent({
97
98
});
98
99
99
100
return {
101
+ PROTOCOL_AETERNITY ,
100
102
isTokenAeCoin ,
101
103
price ,
102
104
targetRouteName ,
Original file line number Diff line number Diff line change @@ -75,7 +75,6 @@ import {
75
75
useCurrencies ,
76
76
} from ' @/composables' ;
77
77
import type { IAsset , Protocol } from ' @/types' ;
78
- import { PROTOCOL_AETERNITY } from ' @/constants' ;
79
78
import { ProtocolAdapterFactory } from ' @/lib/ProtocolAdapterFactory' ;
80
79
import InputField from ' ./InputField.vue' ;
81
80
import InputSelectAsset from ' ./InputSelectAsset.vue' ;
@@ -91,8 +90,7 @@ export default defineComponent({
91
90
selectedAsset: { type: Object as PropType <IAsset | null >, default: null },
92
91
readonly: Boolean ,
93
92
showTokensWithBalance: Boolean ,
94
- // TODO - handle usages & make protocol required
95
- protocol: { type: String as PropType <Protocol >, default: PROTOCOL_AETERNITY },
93
+ protocol: { type: String as PropType <Protocol >, required: true },
96
94
},
97
95
emits: [' update:modelValue' , ' asset-selected' ],
98
96
setup(props , { emit }) {
Original file line number Diff line number Diff line change 1
1
<template >
2
2
<div class =" invite-row" >
3
3
<div class =" invite-info" >
4
- <TokenAmount :amount =" inviteLinkBalance" />
4
+ <TokenAmount
5
+ :amount =" inviteLinkBalance"
6
+ :protocol =" PROTOCOL_AETERNITY"
7
+ />
5
8
<span class =" date" >{{ formatDate(createdAt) }}</span >
6
9
</div >
7
10
<CopyText
51
54
class =" input-amount"
52
55
:label =" $t('pages.invite.top-up-with')"
53
56
:message =" errorMessage"
57
+ :protocol =" PROTOCOL_AETERNITY"
54
58
readonly
55
59
/>
56
60
<div class =" centered-buttons" >
@@ -226,6 +230,7 @@ export default defineComponent({
226
230
);
227
231
228
232
return {
233
+ PROTOCOL_AETERNITY ,
229
234
formModel ,
230
235
max ,
231
236
topUp ,
Original file line number Diff line number Diff line change 14
14
<TransactionOverview
15
15
:transaction =" completeTransaction"
16
16
/>
17
-
18
17
<DetailsItem
19
18
v-if =" !!error"
20
19
:label =" $t('pages.transactionDetails.reason')"
39
38
class =" name-fee"
40
39
>
41
40
<template #value >
42
- <TokenAmount :amount =" nameAeFee" />
41
+ <TokenAmount
42
+ :amount =" nameAeFee"
43
+ :protocol =" PROTOCOL_AETERNITY"
44
+ />
43
45
</template >
44
46
</DetailsItem >
45
47
53
55
:symbol =" tokenSymbol"
54
56
:aex9 =" isTransactionAex9(transactionWrapped)"
55
57
:hide-fiat =" !swapTokenAmountData.isAe"
58
+ :protocol =" PROTOCOL_AETERNITY"
56
59
data-cy =" total"
57
60
/>
58
61
</DetailsItem >
59
62
60
63
<DetailsItem :label =" $t('transaction.fee')" >
61
64
<TokenAmount
62
65
:amount =" txAeFee"
66
+ :protocol =" PROTOCOL_AETERNITY"
63
67
data-cy =" fee"
64
68
/>
65
69
</DetailsItem >
72
76
:amount =" executionCost || totalAmount"
73
77
:symbol =" getTxSymbol(popupProps?.tx)"
74
78
:aex9 =" isTransactionAex9(transactionWrapped)"
79
+ :protocol =" PROTOCOL_AETERNITY"
75
80
data-cy =" total"
76
81
/>
77
82
</DetailsItem >
@@ -138,7 +143,10 @@ import type {
138
143
} from ' @/types' ;
139
144
import { tg } from ' @/store/plugins/languages' ;
140
145
import { RejectedByUserError } from ' @/lib/errors' ;
141
- import { PROTOCOL_AETERNITY , TX_DIRECTION } from ' @/constants' ;
146
+ import {
147
+ PROTOCOL_AETERNITY ,
148
+ TX_DIRECTION ,
149
+ } from ' @/constants' ;
142
150
import {
143
151
fetchJson ,
144
152
handleUnknownError ,
@@ -468,6 +476,7 @@ export default defineComponent({
468
476
return {
469
477
AnimatedSpinner ,
470
478
AE_SYMBOL ,
479
+ PROTOCOL_AETERNITY ,
471
480
TX_FIELDS_TO_DISPLAY ,
472
481
error ,
473
482
executionCost ,
Original file line number Diff line number Diff line change 34
34
35
35
<div >
36
36
<div class =" active-account" >
37
- <AccountItem :address =" activeAccount.address" />
37
+ <AccountItem
38
+ :address =" activeAccount.address"
39
+ :protocol =" PROTOCOL_AETERNITY"
40
+ />
38
41
</div >
39
42
40
43
<div
@@ -87,6 +90,7 @@ import type {
87
90
import { useAccounts , useMultisigAccounts , usePendingMultisigTransaction } from ' @/composables' ;
88
91
import { TX_FUNCTIONS_MULTISIG } from ' @/protocols/aeternity/config' ;
89
92
93
+ import { PROTOCOL_AETERNITY } from ' @/constants' ;
90
94
import Modal from ' ../Modal.vue' ;
91
95
import FormSelect from ' ../form/FormSelect.vue' ;
92
96
import BtnMain from ' ../buttons/BtnMain.vue' ;
@@ -178,6 +182,8 @@ export default defineComponent({
178
182
}
179
183
180
184
return {
185
+ PROTOCOL_AETERNITY ,
186
+ TX_FUNCTIONS_MULTISIG ,
181
187
statusIcon ,
182
188
closeModal ,
183
189
eligibleAccounts ,
@@ -186,7 +192,6 @@ export default defineComponent({
186
192
activeMultisigAccount ,
187
193
confirmActionContent ,
188
194
actionHasError ,
189
- TX_FUNCTIONS_MULTISIG ,
190
195
};
191
196
},
192
197
});
Original file line number Diff line number Diff line change @@ -88,7 +88,7 @@ export default defineComponent({
88
88
},
89
89
props: {
90
90
resolve: { type: Function as PropType <ResolveCallback >, required: true },
91
- protocol: { type: String as PropType <Protocol >, default: PROTOCOL_AETERNITY },
91
+ protocol: { type: String as PropType <Protocol >, required: true },
92
92
close: { type: Function , default: null },
93
93
},
94
94
setup(props ) {
Original file line number Diff line number Diff line change @@ -111,7 +111,6 @@ import type {
111
111
} from ' @/types' ;
112
112
import {
113
113
IS_MOBILE_DEVICE ,
114
- PROTOCOL_AETERNITY ,
115
114
PROTOCOL_BITCOIN ,
116
115
} from ' @/constants' ;
117
116
import { RouteQueryActionsController } from ' @/lib/RouteQueryActionsController' ;
@@ -155,7 +154,7 @@ export default defineComponent({
155
154
accountName: { type: String , default: null },
156
155
tokens: { type: Object as PropType <ITokenList >, default : () => ({}) },
157
156
disableAssetSelection: Boolean ,
158
- protocol: { type: String as PropType <Protocol >, default: PROTOCOL_AETERNITY },
157
+ protocol: { type: String as PropType <Protocol >, required: true },
159
158
},
160
159
setup(props ) {
161
160
const store = useStore ();
Original file line number Diff line number Diff line change 31
31
:key =" signer"
32
32
class =" signer"
33
33
>
34
- <AccountItem :address =" signer" />
34
+ <AccountItem
35
+ :address =" signer"
36
+ :protocol =" PROTOCOL_AETERNITY"
37
+ />
35
38
36
39
<CheckCircle
37
40
v-if =" pendingMultisigTxConfirmedBy.includes(signer) || proposalCompleted"
65
68
import { computed , defineComponent } from ' vue' ;
66
69
import { TranslateResult , useI18n } from ' vue-i18n' ;
67
70
import { useStore } from ' vuex' ;
68
- import { MODAL_CONSENSUS_INFO } from ' @/constants' ;
71
+ import {
72
+ MODAL_CONSENSUS_INFO ,
73
+ PROTOCOL_AETERNITY ,
74
+ } from ' @/constants' ;
69
75
import {
70
76
useAccounts ,
71
77
useModals ,
@@ -171,7 +177,7 @@ export default defineComponent({
171
177
return {
172
178
content: t (' pages.proposalDetails.infoBox.pending' , [
173
179
pendingMultisigTxPendingConfirmationsCount .value ,
174
- pendingMultisigTxPendingConfirmationsCount .value > 1
180
+ ( pendingMultisigTxPendingConfirmationsCount .value > 1 )
175
181
? t (' pages.proposalDetails.infoBox.signatures' )
176
182
: t (' pages.proposalDetails.infoBox.signature' ),
177
183
]),
@@ -184,6 +190,7 @@ export default defineComponent({
184
190
}
185
191
186
192
return {
193
+ PROTOCOL_AETERNITY ,
187
194
activeMultisigAccount ,
188
195
isLocalAccountAddress ,
189
196
infoBox ,
Original file line number Diff line number Diff line change 65
65
<TokenAmount
66
66
:amount =" fee"
67
67
:symbol =" AE_SYMBOL"
68
+ :protocol =" PROTOCOL_AETERNITY"
68
69
/>
69
70
</template >
70
71
</DetailsItem >
You can’t perform that action at this time.
0 commit comments