Skip to content

Commit aa5110d

Browse files
committed
Banks: add FULL_OR_SHARED sepa support case + remove « -support » from enum values + regenerate bank list
1 parent f7ee2c4 commit aa5110d

File tree

6 files changed

+122
-83
lines changed

6 files changed

+122
-83
lines changed

scripts/getBankList.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,8 @@ async function convertXlsxToJson(xlsxFilePath, jsonFilePath) {
105105
support: {
106106
sepa: {
107107
// We assume that banks at least fully support inbound sepa instant if they are part of the list
108-
inbound: 'full-support',
109-
outbound: 'partial-support',
108+
inbound: 'full',
109+
outbound: 'partial',
110110
},
111111
},
112112
};

src/components/BankCheckInput.vue

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
<CaretRightSmallIcon class="caret-right-small-icon"
7070
v-if="bank.support.sepa.outbound === SEPA_INSTANT_SUPPORT.FULL"/>
7171
<Tooltip
72-
v-if="bank.support.sepa.outbound === SEPA_INSTANT_SUPPORT.PARTIAL
72+
v-else-if="bank.support.sepa.outbound === SEPA_INSTANT_SUPPORT.PARTIAL
7373
|| bank.support.sepa.outbound === SEPA_INSTANT_SUPPORT.UNKNOWN"
7474
class="circled-question-mark"
7575
preferredPosition="bottom left"
@@ -80,6 +80,19 @@
8080
<p>{{ $t('Not all accounts provided by this bank support instant transactions.') }}</p>
8181
<p>{{ $t('Contact your bank to find out if your account is eligible.') }}</p>
8282
</Tooltip>
83+
<Tooltip
84+
v-else-if="bank.support.sepa.outbound === SEPA_INSTANT_SUPPORT.FULL_OR_SHARED"
85+
class="alert-triangle-icon"
86+
preferredPosition="bottom left"
87+
theme="inverse"
88+
:container="$bankAutocomplete && { $el: $bankAutocomplete }"
89+
:styles="{ transform: `translate3d(${isScrollable ? -1 : 5}%, 2rem, 1px)` }">
90+
<AlertTriangleIcon slot="trigger"/>
91+
<p>{{ $t('Without an individual IBAN, refunds are impossible!') }}</p>
92+
<p>{{ $t('{bankName} offers generic and individual IBANs.', { bankName: bank.name }) }}</p>
93+
<p>{{ $t('In case of any issues, like exceeded limits or insufficient amounts, '
94+
+ 'the automatic refunds will only work for individual IBAN addresses.') }}</p>
95+
</Tooltip>
8396
</li>
8497
<li class="more-count" v-if="matchingBanks.length > visibleBanks.length">
8598
<a @click="isScrollable = true">
@@ -96,7 +109,7 @@
96109

97110
<script lang="ts">
98111
import { defineComponent, computed, ref, watch, onMounted } from '@vue/composition-api';
99-
import { LabelInput, CaretRightSmallIcon, Tooltip } from '@nimiq/vue-components';
112+
import { LabelInput, CaretRightSmallIcon, Tooltip, AlertTriangleIcon } from '@nimiq/vue-components';
100113
import { SEPA_INSTANT_SUPPORT, BankInfos } from '@/stores/Swaps';
101114
// @ts-expect-error Could not find a declaration file for module 'v-click-outside'.
102115
import vClickOutside from 'v-click-outside';
@@ -448,6 +461,7 @@ export default defineComponent({
448461
Tooltip,
449462
CountryFlag,
450463
WorldIcon,
464+
AlertTriangleIcon,
451465
},
452466
directives: {
453467
ClickOutside: vClickOutside.directive,
@@ -724,7 +738,8 @@ export default defineComponent({
724738
transition: opacity 200ms var(--nimiq-ease);
725739
}
726740
727-
.circled-question-mark {
741+
.circled-question-mark,
742+
.alert-triangle-icon {
728743
flex-shrink: 0;
729744
flex-grow: 0;
730745
@@ -736,20 +751,29 @@ export default defineComponent({
736751
0px 2px 2.5px rgba(31, 35, 72, 0.04);
737752
}
738753
739-
.circled-question-mark-icon {
754+
svg {
740755
color: var(--nimiq-orange);
741756
}
742757
758+
p {
759+
line-height: 130%;
760+
}
761+
743762
p:first-child {
744763
color: var(--text-100);
745764
margin-bottom: 1rem;
746765
}
747766
748-
p:last-child {
767+
p:not(:first-child) {
749768
color: var(--text-60);
750-
margin: 0;
769+
margin-top: 0;
770+
margin-bottom: .5rem;
751771
font-size: var(--small-size);
752772
}
773+
774+
p:last-child {
775+
margin-bottom: 0;
776+
}
753777
}
754778
}
755779

0 commit comments

Comments
 (0)