anastasis: no more currencies per country
This commit is contained in:
parent
bc05050524
commit
3957f529bf
@ -1,7 +1,6 @@
|
|||||||
// This file is auto-generated, do not modify.
|
// This file is auto-generated, do not modify.
|
||||||
// Generated from v0.2.0-4-g61ea83c on Tue, 05 Oct 2021 10:40:32 +0200
|
// Generated from v0.2.0-151-g2ae958d on Thu, 14 Apr 2022 20:38:58 +0200
|
||||||
// To re-generate, run contrib/gen-ts.sh from the main anastasis code base.
|
// To re-generate, run contrib/gen-ts.sh from the main anastasis code base.
|
||||||
// XXX: Modified for demo, allowing demo providers for EUR
|
|
||||||
|
|
||||||
export const anastasisData = {
|
export const anastasisData = {
|
||||||
providersList: {
|
providersList: {
|
||||||
@ -9,44 +8,36 @@ export const anastasisData = {
|
|||||||
"SPDX-License-Identifier": "GPL3.0-or-later",
|
"SPDX-License-Identifier": "GPL3.0-or-later",
|
||||||
anastasis_provider: [
|
anastasis_provider: [
|
||||||
{
|
{
|
||||||
url: "https://anastasis.demo.taler.net/",
|
url: "https://v1.anastasis.taler.net/",
|
||||||
currency: "KUDOS",
|
name: "Bern University of Applied Sciences, Switzerland",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
url: "https://kudos.demo.anastasis.lu/",
|
url: "https://v1.anastasis.codeblau.de/",
|
||||||
currency: "KUDOS",
|
name: "Codeblau GmbH, Germany",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
url: "https://anastasis.demo.taler.net/",
|
url: "https://v1.anastasis.openw3b.org/",
|
||||||
currency: "EUR",
|
name: "Openw3b Foundation, India",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
url: "https://kudos.demo.anastasis.lu/",
|
url: "https://v1.anastasis.lu/",
|
||||||
currency: "EUR",
|
name: "Anastasis SARL, Luxembourg",
|
||||||
},
|
|
||||||
{
|
|
||||||
url: "https://anastasis.demo.taler.net/",
|
|
||||||
currency: "CHF",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
url: "https://kudos.demo.anastasis.lu/",
|
|
||||||
currency: "CHF",
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
url: "http://localhost:8086/",
|
url: "http://localhost:8086/",
|
||||||
currency: "TESTKUDOS",
|
restricted: "xx",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
url: "http://localhost:8087/",
|
url: "http://localhost:8087/",
|
||||||
currency: "TESTKUDOS",
|
restricted: "xx",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
url: "http://localhost:8088/",
|
url: "http://localhost:8088/",
|
||||||
currency: "TESTKUDOS",
|
restricted: "xx",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
url: "http://localhost:8089/",
|
url: "http://localhost:8089/",
|
||||||
currency: "TESTKUDOS",
|
restricted: "xx",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
@ -62,7 +53,6 @@ export const anastasisData = {
|
|||||||
de_DE: "Albanien",
|
de_DE: "Albanien",
|
||||||
en_UK: "Albania",
|
en_UK: "Albania",
|
||||||
},
|
},
|
||||||
currency: "ALL",
|
|
||||||
call_code: "+355",
|
call_code: "+355",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -73,7 +63,6 @@ export const anastasisData = {
|
|||||||
de_DE: "Belgien",
|
de_DE: "Belgien",
|
||||||
en_UK: "Belgium",
|
en_UK: "Belgium",
|
||||||
},
|
},
|
||||||
currency: "EUR",
|
|
||||||
call_code: "+32",
|
call_code: "+32",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -86,7 +75,6 @@ export const anastasisData = {
|
|||||||
fr_FR: "Suisse",
|
fr_FR: "Suisse",
|
||||||
en_UK: "Swiss",
|
en_UK: "Swiss",
|
||||||
},
|
},
|
||||||
currency: "CHF",
|
|
||||||
call_code: "+41",
|
call_code: "+41",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -96,7 +84,6 @@ export const anastasisData = {
|
|||||||
name_i18n: {
|
name_i18n: {
|
||||||
en_UK: "Czech Republic",
|
en_UK: "Czech Republic",
|
||||||
},
|
},
|
||||||
currency: "CZK",
|
|
||||||
call_code: "+420",
|
call_code: "+420",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -110,7 +97,6 @@ export const anastasisData = {
|
|||||||
fr_FR: "Allemagne",
|
fr_FR: "Allemagne",
|
||||||
en_UK: "Germany",
|
en_UK: "Germany",
|
||||||
},
|
},
|
||||||
currency: "EUR",
|
|
||||||
call_code: "+49",
|
call_code: "+49",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -121,7 +107,6 @@ export const anastasisData = {
|
|||||||
name_i18n: {
|
name_i18n: {
|
||||||
en_UK: "Denmark",
|
en_UK: "Denmark",
|
||||||
},
|
},
|
||||||
currency: "DKK",
|
|
||||||
call_code: "+45",
|
call_code: "+45",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -132,9 +117,18 @@ export const anastasisData = {
|
|||||||
name_i18n: {
|
name_i18n: {
|
||||||
es_ES: "España",
|
es_ES: "España",
|
||||||
},
|
},
|
||||||
currency: "EUR",
|
|
||||||
call_code: "+44",
|
call_code: "+44",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
code: "fr",
|
||||||
|
name: "France",
|
||||||
|
continent: "Europe",
|
||||||
|
name_i18n: {
|
||||||
|
de_DE: "Frankreich",
|
||||||
|
fr_FR: "La France",
|
||||||
|
},
|
||||||
|
call_code: "+33",
|
||||||
|
},
|
||||||
{
|
{
|
||||||
code: "in",
|
code: "in",
|
||||||
name: "India",
|
name: "India",
|
||||||
@ -146,7 +140,6 @@ export const anastasisData = {
|
|||||||
fr_FR: "l'Inde",
|
fr_FR: "l'Inde",
|
||||||
en_UK: "India",
|
en_UK: "India",
|
||||||
},
|
},
|
||||||
currency: "INR",
|
|
||||||
call_code: "+91",
|
call_code: "+91",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -157,7 +150,6 @@ export const anastasisData = {
|
|||||||
de_DE: "Italien",
|
de_DE: "Italien",
|
||||||
en_UK: "Italy",
|
en_UK: "Italy",
|
||||||
},
|
},
|
||||||
currency: "EUR",
|
|
||||||
call_code: "+39",
|
call_code: "+39",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -170,17 +162,26 @@ export const anastasisData = {
|
|||||||
de_CH: "Japan",
|
de_CH: "Japan",
|
||||||
en_UK: "Japan",
|
en_UK: "Japan",
|
||||||
},
|
},
|
||||||
currency: "JPY",
|
|
||||||
call_code: "+81",
|
call_code: "+81",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
code: "sl",
|
code: "nl",
|
||||||
|
name: "Netherlands",
|
||||||
|
continent: "Europe",
|
||||||
|
name_i18n: {
|
||||||
|
de_DE: "Niederlande",
|
||||||
|
nl_NL: "Nederland",
|
||||||
|
en_UK: "Netherlands",
|
||||||
|
},
|
||||||
|
call_code: "+31",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
code: "sk",
|
||||||
name: "Slovakia",
|
name: "Slovakia",
|
||||||
continent: "Europe",
|
continent: "Europe",
|
||||||
name_i18n: {
|
name_i18n: {
|
||||||
en_UK: "Slovakia",
|
en_UK: "Slovakia",
|
||||||
},
|
},
|
||||||
currency: "EUR",
|
|
||||||
call_code: "+421",
|
call_code: "+421",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -194,37 +195,20 @@ export const anastasisData = {
|
|||||||
fr_FR: "États-Unis d'Amérique (USA)",
|
fr_FR: "États-Unis d'Amérique (USA)",
|
||||||
en_UK: "United States of America (USA)",
|
en_UK: "United States of America (USA)",
|
||||||
},
|
},
|
||||||
currency: "USD",
|
|
||||||
call_code: "+1",
|
call_code: "+1",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
code: "xx",
|
code: "xx",
|
||||||
name: "Testland",
|
name: "Testland",
|
||||||
continent: "Testcontinent",
|
continent: "Demoworld",
|
||||||
continent_i18n: { de_DE: "Testkontinent" },
|
|
||||||
name_i18n: {
|
name_i18n: {
|
||||||
de_DE: "Testlandt",
|
de_DE: "Testlandt",
|
||||||
de_CH: "Testlandi",
|
de_CH: "Testlandi",
|
||||||
fr_FR: "Testpais",
|
fr_FR: "Testpais",
|
||||||
en_UK: "Testland",
|
en_UK: "Testland",
|
||||||
},
|
},
|
||||||
currency: "TESTKUDOS",
|
|
||||||
call_code: "+00",
|
call_code: "+00",
|
||||||
},
|
},
|
||||||
{
|
|
||||||
code: "xy",
|
|
||||||
name: "Demoland",
|
|
||||||
continent: "Testcontinent",
|
|
||||||
continent_i18n: { de_DE: "Testkontinent" },
|
|
||||||
name_i18n: {
|
|
||||||
de_DE: "Demolandt",
|
|
||||||
de_CH: "Demolandi",
|
|
||||||
fr_FR: "Demopais",
|
|
||||||
en_UK: "Demoland",
|
|
||||||
},
|
|
||||||
currency: "KUDOS",
|
|
||||||
call_code: "+01",
|
|
||||||
},
|
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
countryDetails: {
|
countryDetails: {
|
||||||
@ -337,9 +321,9 @@ export const anastasisData = {
|
|||||||
widget: "anastasis_gtk_ia_ahv",
|
widget: "anastasis_gtk_ia_ahv",
|
||||||
uuid: "1da87570-ba16-4f62-8a7e-cbda92f51591",
|
uuid: "1da87570-ba16-4f62-8a7e-cbda92f51591",
|
||||||
"validation-regex":
|
"validation-regex":
|
||||||
"^(756).[0-9]{4}.[0-9]{4}.[0-9]{2}|(756)[0-9]{10}$",
|
"^(756)\\.[0-9]{4}\\.[0-9]{4}\\.[0-9]{2}|(756)[0-9]{10}$",
|
||||||
"validation-logic": "CH_AHV_check",
|
"validation-logic": "CH_AHV_check",
|
||||||
autocomplete: "???.????.????.??"
|
autocomplete: "???.????.????.??",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
@ -402,19 +386,6 @@ export const anastasisData = {
|
|||||||
widget: "anastasis_gtk_ia_birthplace",
|
widget: "anastasis_gtk_ia_birthplace",
|
||||||
uuid: "4c822e8e-89c6-11eb-95c4-8b077ad8489f",
|
uuid: "4c822e8e-89c6-11eb-95c4-8b077ad8489f",
|
||||||
},
|
},
|
||||||
{
|
|
||||||
type: "string",
|
|
||||||
name: "tax_number",
|
|
||||||
label: "Taxpayer identification number",
|
|
||||||
label_i18n: {
|
|
||||||
de_DE: "Steuerliche Identifikationsnummer",
|
|
||||||
en: "German taxpayer identification number",
|
|
||||||
},
|
|
||||||
widget: "anastasis_gtk_ia_tax_de",
|
|
||||||
uuid: "dae48f85-e3ff-47a4-a4a3-ed981ed8c3c6",
|
|
||||||
"validation-regex": "^[0-9]{11}$",
|
|
||||||
"validation-logic": "DE_TIN_check",
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
type: "string",
|
type: "string",
|
||||||
name: "social_security_number",
|
name: "social_security_number",
|
||||||
@ -429,6 +400,19 @@ export const anastasisData = {
|
|||||||
"validation-logic": "DE_SVN_check",
|
"validation-logic": "DE_SVN_check",
|
||||||
optional: true,
|
optional: true,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
type: "string",
|
||||||
|
name: "tax_number",
|
||||||
|
label: "Taxpayer identification number",
|
||||||
|
label_i18n: {
|
||||||
|
de_DE: "Steuerliche Identifikationsnummer",
|
||||||
|
en: "German taxpayer identification number",
|
||||||
|
},
|
||||||
|
widget: "anastasis_gtk_ia_tin_de",
|
||||||
|
uuid: "dae48f85-e3ff-47a4-a4a3-ed981ed8c3c6",
|
||||||
|
"validation-regex": "^[0-9]{11}$",
|
||||||
|
"validation-logic": "DE_TIN_check",
|
||||||
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
dk: {
|
dk: {
|
||||||
@ -514,6 +498,46 @@ export const anastasisData = {
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
fr: {
|
||||||
|
license: "GPLv3+",
|
||||||
|
"SPDX-License-Identifier": "GPL3.0-or-later",
|
||||||
|
required_attributes: [
|
||||||
|
{
|
||||||
|
type: "string",
|
||||||
|
name: "full_name",
|
||||||
|
label: "Full name",
|
||||||
|
widget: "anastasis_gtk_ia_full_name",
|
||||||
|
uuid: "9e8f463f-575f-42cb-85f3-759559997331",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: "date",
|
||||||
|
name: "birthdate",
|
||||||
|
label: "Birthdate",
|
||||||
|
widget: "anastasis_gtk_ia_birthdate",
|
||||||
|
uuid: "83d655c7-bdb6-484d-904e-80c1058c8854",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: "string",
|
||||||
|
name: "birthplace",
|
||||||
|
label: "Birthplace",
|
||||||
|
widget: "anastasis_gtk_ia_birthplace",
|
||||||
|
uuid: "4c822e8e-89c6-11eb-95c4-8b077ad8489f",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: "string",
|
||||||
|
name: "social_security_number",
|
||||||
|
label: "Code Insee",
|
||||||
|
label_i18n: {
|
||||||
|
fr_FR: "Code Insee",
|
||||||
|
en: "INSEE code",
|
||||||
|
},
|
||||||
|
widget: "anastasis_gtk_ia_insee_fr",
|
||||||
|
uuid: "2f36a81c-3f6d-41f3-97ee-9c885bc41873",
|
||||||
|
"validation-regex": "^[0-9]{15}$",
|
||||||
|
"validation-logic": "FR_INSEE_check",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
in: {
|
in: {
|
||||||
license: "GPLv3+",
|
license: "GPLv3+",
|
||||||
"SPDX-License-Identifier": "GPL3.0-or-later",
|
"SPDX-License-Identifier": "GPL3.0-or-later",
|
||||||
@ -626,6 +650,46 @@ export const anastasisData = {
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
nl: {
|
||||||
|
license: "GPLv3+",
|
||||||
|
"SPDX-License-Identifier": "GPL3.0-or-later",
|
||||||
|
required_attributes: [
|
||||||
|
{
|
||||||
|
type: "string",
|
||||||
|
name: "full_name",
|
||||||
|
label: "Full name",
|
||||||
|
widget: "anastasis_gtk_ia_full_name",
|
||||||
|
uuid: "9e8f463f-575f-42cb-85f3-759559997331",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: "date",
|
||||||
|
name: "birthdate",
|
||||||
|
label: "Birthdate",
|
||||||
|
widget: "anastasis_gtk_ia_birthdate",
|
||||||
|
uuid: "83d655c7-bdb6-484d-904e-80c1058c8854",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: "string",
|
||||||
|
name: "birthplace",
|
||||||
|
label: "Birthplace",
|
||||||
|
widget: "anastasis_gtk_ia_birthplace",
|
||||||
|
uuid: "4c822e8e-89c6-11eb-95c4-8b077ad8489f",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: "string",
|
||||||
|
name: "social_security_number",
|
||||||
|
label: "Citizen Service Number",
|
||||||
|
label_i18n: {
|
||||||
|
nl_NL: "Burgerservicenummer (BSN)",
|
||||||
|
en: "Citizen Service Number",
|
||||||
|
},
|
||||||
|
widget: "anastasis_gtk_ia_ssn_nl",
|
||||||
|
uuid: "b6bf1f14-1f85-4afb-af21-f54b88490bdc",
|
||||||
|
"validation-regex": "^[1-9][0-9]{8}$",
|
||||||
|
"validation-logic": "NL_BSN_check",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
sk: {
|
sk: {
|
||||||
license: "GPLv3+",
|
license: "GPLv3+",
|
||||||
"SPDX-License-Identifier": "GPL3.0-or-later",
|
"SPDX-License-Identifier": "GPL3.0-or-later",
|
||||||
@ -702,35 +766,7 @@ export const anastasisData = {
|
|||||||
xx: {
|
xx: {
|
||||||
license: "GPLv3+",
|
license: "GPLv3+",
|
||||||
"SPDX-License-Identifier": "GPL3.0-or-later",
|
"SPDX-License-Identifier": "GPL3.0-or-later",
|
||||||
required_attributes: [
|
restricted: "xx",
|
||||||
{
|
|
||||||
type: "string",
|
|
||||||
name: "full_name",
|
|
||||||
label: "Full name",
|
|
||||||
widget: "anastasis_gtk_ia_full_name",
|
|
||||||
uuid: "9e8f463f-575f-42cb-85f3-759559997331",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: "date",
|
|
||||||
name: "birthdate",
|
|
||||||
label: "Birthdate",
|
|
||||||
widget: "anastasis_gtk_ia_birthdate",
|
|
||||||
uuid: "83d655c7-bdb6-484d-904e-80c1058c8854",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: "string",
|
|
||||||
name: "sq_number",
|
|
||||||
label: "Square number",
|
|
||||||
widget: "anastasis_gtk_xx_square",
|
|
||||||
uuid: "ed790bca-89bf-11eb-96f2-233996cf644e",
|
|
||||||
"validation-regex": "^[0-9]+$",
|
|
||||||
"validation-logic": "XX_SQUARE_check",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
xy: {
|
|
||||||
license: "GPLv3+",
|
|
||||||
"SPDX-License-Identifier": "GPL3.0-or-later",
|
|
||||||
required_attributes: [
|
required_attributes: [
|
||||||
{
|
{
|
||||||
type: "string",
|
type: "string",
|
||||||
@ -754,6 +790,16 @@ export const anastasisData = {
|
|||||||
uuid: "39190a95-cacb-4412-8bae-1f7da3f980b4",
|
uuid: "39190a95-cacb-4412-8bae-1f7da3f980b4",
|
||||||
"validation-regex": "^[0-9]+$",
|
"validation-regex": "^[0-9]+$",
|
||||||
"validation-logic": "XY_PRIME_check",
|
"validation-logic": "XY_PRIME_check",
|
||||||
|
optional: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: "string",
|
||||||
|
name: "sq_number",
|
||||||
|
label: "Square number",
|
||||||
|
widget: "anastasis_gtk_xx_square",
|
||||||
|
uuid: "ed790bca-89bf-11eb-96f2-233996cf644e",
|
||||||
|
"validation-regex": "^[0-9]+$",
|
||||||
|
"validation-logic": "XX_SQUARE_check",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
@ -142,23 +142,13 @@ const logger = new Logger("anastasis-core:index.ts");
|
|||||||
|
|
||||||
const ANASTASIS_HTTP_HEADER_POLICY_META_DATA = "Anastasis-Policy-Meta-Data";
|
const ANASTASIS_HTTP_HEADER_POLICY_META_DATA = "Anastasis-Policy-Meta-Data";
|
||||||
|
|
||||||
function getContinents(
|
function getContinents(): ContinentInfo[] {
|
||||||
opts: { requireProvider?: boolean } = {},
|
|
||||||
): ContinentInfo[] {
|
|
||||||
const currenciesWithProvider = new Set<string>();
|
|
||||||
anastasisData.providersList.anastasis_provider.forEach((x) => {
|
|
||||||
currenciesWithProvider.add(x.currency);
|
|
||||||
});
|
|
||||||
const continentSet = new Set<string>();
|
const continentSet = new Set<string>();
|
||||||
const continents: ContinentInfo[] = [];
|
const continents: ContinentInfo[] = [];
|
||||||
for (const country of anastasisData.countriesList.countries) {
|
for (const country of anastasisData.countriesList.countries) {
|
||||||
if (continentSet.has(country.continent)) {
|
if (continentSet.has(country.continent)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (opts.requireProvider && !currenciesWithProvider.has(country.currency)) {
|
|
||||||
// Country's currency doesn't have any providers => skip
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
continentSet.add(country.continent);
|
continentSet.add(country.continent);
|
||||||
continents.push({
|
continents.push({
|
||||||
...{ name_i18n: country.continent_i18n },
|
...{ name_i18n: country.continent_i18n },
|
||||||
@ -191,23 +181,14 @@ export class ReducerError extends Error {
|
|||||||
* Get countries for a continent, abort with ReducerError
|
* Get countries for a continent, abort with ReducerError
|
||||||
* exception when continent doesn't exist.
|
* exception when continent doesn't exist.
|
||||||
*/
|
*/
|
||||||
function getCountries(
|
function getCountries(continent: string): CountryInfo[] {
|
||||||
continent: string,
|
|
||||||
opts: { requireProvider?: boolean } = {},
|
|
||||||
): CountryInfo[] {
|
|
||||||
const currenciesWithProvider = new Set<string>();
|
|
||||||
anastasisData.providersList.anastasis_provider.forEach((x) => {
|
|
||||||
currenciesWithProvider.add(x.currency);
|
|
||||||
});
|
|
||||||
const countries = anastasisData.countriesList.countries.filter(
|
const countries = anastasisData.countriesList.countries.filter(
|
||||||
(x) =>
|
(x) => x.continent === continent,
|
||||||
x.continent === continent &&
|
|
||||||
(!opts.requireProvider || currenciesWithProvider.has(x.currency)),
|
|
||||||
);
|
);
|
||||||
if (countries.length <= 0) {
|
if (countries.length <= 0) {
|
||||||
throw new ReducerError({
|
throw new ReducerError({
|
||||||
code: TalerErrorCode.ANASTASIS_REDUCER_INPUT_INVALID,
|
code: TalerErrorCode.ANASTASIS_REDUCER_INPUT_INVALID,
|
||||||
hint: "continent not found",
|
hint: `continent ${continent} not found`,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
return countries;
|
return countries;
|
||||||
@ -217,9 +198,7 @@ export async function getBackupStartState(): Promise<ReducerStateBackup> {
|
|||||||
return {
|
return {
|
||||||
reducer_type: "backup",
|
reducer_type: "backup",
|
||||||
backup_state: BackupStates.ContinentSelecting,
|
backup_state: BackupStates.ContinentSelecting,
|
||||||
continents: getContinents({
|
continents: getContinents(),
|
||||||
requireProvider: true,
|
|
||||||
}),
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -227,9 +206,7 @@ export async function getRecoveryStartState(): Promise<ReducerStateRecovery> {
|
|||||||
return {
|
return {
|
||||||
reducer_type: "recovery",
|
reducer_type: "recovery",
|
||||||
recovery_state: RecoveryStates.ContinentSelecting,
|
recovery_state: RecoveryStates.ContinentSelecting,
|
||||||
continents: getContinents({
|
continents: getContinents(),
|
||||||
requireProvider: true,
|
|
||||||
}),
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -238,7 +215,6 @@ async function selectCountry(
|
|||||||
args: ActionArgsSelectCountry,
|
args: ActionArgsSelectCountry,
|
||||||
): Promise<Partial<ReducerStateBackup> & Partial<ReducerStateRecovery>> {
|
): Promise<Partial<ReducerStateBackup> & Partial<ReducerStateRecovery>> {
|
||||||
const countryCode = args.country_code;
|
const countryCode = args.country_code;
|
||||||
const currencies = args.currencies;
|
|
||||||
const country = anastasisData.countriesList.countries.find(
|
const country = anastasisData.countriesList.countries.find(
|
||||||
(x) => x.code === countryCode,
|
(x) => x.code === countryCode,
|
||||||
);
|
);
|
||||||
@ -258,7 +234,10 @@ async function selectCountry(
|
|||||||
|
|
||||||
const providers: { [x: string]: AuthenticationProviderStatus } = {};
|
const providers: { [x: string]: AuthenticationProviderStatus } = {};
|
||||||
for (const prov of anastasisData.providersList.anastasis_provider) {
|
for (const prov of anastasisData.providersList.anastasis_provider) {
|
||||||
if (currencies.includes(prov.currency)) {
|
let shouldAdd =
|
||||||
|
country.code === prov.restricted ||
|
||||||
|
(country.code !== "xx" && !prov.restricted);
|
||||||
|
if (shouldAdd) {
|
||||||
providers[prov.url] = {
|
providers[prov.url] = {
|
||||||
status: "not-contacted",
|
status: "not-contacted",
|
||||||
};
|
};
|
||||||
@ -270,7 +249,6 @@ async function selectCountry(
|
|||||||
|
|
||||||
return {
|
return {
|
||||||
selected_country: countryCode,
|
selected_country: countryCode,
|
||||||
currencies,
|
|
||||||
required_attributes: ra,
|
required_attributes: ra,
|
||||||
authentication_providers: providers,
|
authentication_providers: providers,
|
||||||
};
|
};
|
||||||
@ -1223,9 +1201,7 @@ async function backupSelectContinent(
|
|||||||
state: ReducerStateBackup,
|
state: ReducerStateBackup,
|
||||||
args: ActionArgsSelectContinent,
|
args: ActionArgsSelectContinent,
|
||||||
): Promise<ReducerStateBackup | ReducerStateError> {
|
): Promise<ReducerStateBackup | ReducerStateError> {
|
||||||
const countries = getCountries(args.continent, {
|
const countries = getCountries(args.continent);
|
||||||
requireProvider: true,
|
|
||||||
});
|
|
||||||
if (countries.length <= 0) {
|
if (countries.length <= 0) {
|
||||||
return {
|
return {
|
||||||
reducer_type: "error",
|
reducer_type: "error",
|
||||||
@ -1245,9 +1221,7 @@ async function recoverySelectContinent(
|
|||||||
state: ReducerStateRecovery,
|
state: ReducerStateRecovery,
|
||||||
args: ActionArgsSelectContinent,
|
args: ActionArgsSelectContinent,
|
||||||
): Promise<ReducerStateRecovery | ReducerStateError> {
|
): Promise<ReducerStateRecovery | ReducerStateError> {
|
||||||
const countries = getCountries(args.continent, {
|
const countries = getCountries(args.continent);
|
||||||
requireProvider: true,
|
|
||||||
});
|
|
||||||
return {
|
return {
|
||||||
...state,
|
...state,
|
||||||
recovery_state: RecoveryStates.CountrySelecting,
|
recovery_state: RecoveryStates.CountrySelecting,
|
||||||
@ -1540,6 +1514,40 @@ async function nextFromChallengeSelecting(
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function syncProviders(
|
||||||
|
state: ReducerStateRecovery,
|
||||||
|
args: void,
|
||||||
|
): Promise<ReducerStateRecovery | ReducerStateError> {
|
||||||
|
const escrowMethods = state.verbatim_recovery_document?.escrow_methods ?? [];
|
||||||
|
if (escrowMethods.length === 0) {
|
||||||
|
return {
|
||||||
|
reducer_type: "error",
|
||||||
|
code: TalerErrorCode.ANASTASIS_REDUCER_ACTION_INVALID,
|
||||||
|
hint: "Can't sync, no escrow methods in recovery doc.",
|
||||||
|
};
|
||||||
|
}
|
||||||
|
for (const x of escrowMethods) {
|
||||||
|
const pi = state.authentication_providers?.[x.url];
|
||||||
|
if (pi?.status === "ok") {
|
||||||
|
logger.info(`provider ${x.url} is synced`);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
const newPi = await getProviderInfo(x.url);
|
||||||
|
return {
|
||||||
|
...state,
|
||||||
|
authentication_providers: {
|
||||||
|
...state.authentication_providers,
|
||||||
|
[x.url]: newPi,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
reducer_type: "error",
|
||||||
|
code: TalerErrorCode.ANASTASIS_REDUCER_PROVIDERS_ALREADY_SYNCED,
|
||||||
|
hint: "all providers are already synced",
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
async function enterSecretName(
|
async function enterSecretName(
|
||||||
state: ReducerStateBackup,
|
state: ReducerStateBackup,
|
||||||
args: ActionArgsEnterSecretName,
|
args: ActionArgsEnterSecretName,
|
||||||
@ -1714,6 +1722,7 @@ const recoveryTransitions: Record<
|
|||||||
),
|
),
|
||||||
...transition("poll", codecForAny(), pollChallenges),
|
...transition("poll", codecForAny(), pollChallenges),
|
||||||
...transition("next", codecForAny(), nextFromChallengeSelecting),
|
...transition("next", codecForAny(), nextFromChallengeSelecting),
|
||||||
|
...transition("sync_providers", codecForAny(), syncProviders),
|
||||||
},
|
},
|
||||||
[RecoveryStates.ChallengeSolving]: {
|
[RecoveryStates.ChallengeSolving]: {
|
||||||
...transitionRecoveryJump("back", RecoveryStates.ChallengeSelecting),
|
...transitionRecoveryJump("back", RecoveryStates.ChallengeSelecting),
|
||||||
|
@ -41,7 +41,6 @@ export interface CountryInfo {
|
|||||||
code: string;
|
code: string;
|
||||||
name: string;
|
name: string;
|
||||||
continent: string;
|
continent: string;
|
||||||
currency: string;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Policy {
|
export interface Policy {
|
||||||
@ -77,8 +76,6 @@ export interface ReducerStateBackup {
|
|||||||
|
|
||||||
backup_state: BackupStates;
|
backup_state: BackupStates;
|
||||||
|
|
||||||
currencies?: string[];
|
|
||||||
|
|
||||||
continents?: ContinentInfo[];
|
continents?: ContinentInfo[];
|
||||||
|
|
||||||
countries?: CountryInfo[];
|
countries?: CountryInfo[];
|
||||||
@ -201,7 +198,6 @@ export interface ReducerStateRecovery {
|
|||||||
|
|
||||||
selected_continent?: string;
|
selected_continent?: string;
|
||||||
selected_country?: string;
|
selected_country?: string;
|
||||||
currencies?: string[];
|
|
||||||
|
|
||||||
required_attributes?: UserAttributeSpec[];
|
required_attributes?: UserAttributeSpec[];
|
||||||
|
|
||||||
@ -406,7 +402,6 @@ export const codecForActionArgSelectContinent = () =>
|
|||||||
|
|
||||||
export interface ActionArgsSelectCountry {
|
export interface ActionArgsSelectCountry {
|
||||||
country_code: string;
|
country_code: string;
|
||||||
currencies: string[];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ActionArgsSelectChallenge {
|
export interface ActionArgsSelectChallenge {
|
||||||
@ -551,5 +546,4 @@ export const codecForActionArgsSelectChallenge = () =>
|
|||||||
export const codecForActionArgSelectCountry = () =>
|
export const codecForActionArgSelectCountry = () =>
|
||||||
buildCodecForObject<ActionArgsSelectCountry>()
|
buildCodecForObject<ActionArgsSelectCountry>()
|
||||||
.property("country_code", codecForString())
|
.property("country_code", codecForString())
|
||||||
.property("currencies", codecForList(codecForString()))
|
|
||||||
.build("ActionArgSelectCountry");
|
.build("ActionArgSelectCountry");
|
||||||
|
@ -3,6 +3,7 @@ import {
|
|||||||
BackupStates,
|
BackupStates,
|
||||||
RecoveryStates,
|
RecoveryStates,
|
||||||
ReducerState,
|
ReducerState,
|
||||||
|
ReducerStateRecovery,
|
||||||
} from "@gnu-taler/anastasis-core";
|
} from "@gnu-taler/anastasis-core";
|
||||||
import { FunctionalComponent, h, VNode } from "preact";
|
import { FunctionalComponent, h, VNode } from "preact";
|
||||||
import { AnastasisProvider } from "../context/anastasis";
|
import { AnastasisProvider } from "../context/anastasis";
|
||||||
@ -222,7 +223,7 @@ export const reducerStatesExample = {
|
|||||||
challengeSolving: {
|
challengeSolving: {
|
||||||
...base,
|
...base,
|
||||||
recovery_state: RecoveryStates.ChallengeSolving,
|
recovery_state: RecoveryStates.ChallengeSolving,
|
||||||
} as ReducerState,
|
} as ReducerStateRecovery,
|
||||||
challengePaying: {
|
challengePaying: {
|
||||||
...base,
|
...base,
|
||||||
recovery_state: RecoveryStates.ChallengePaying,
|
recovery_state: RecoveryStates.ChallengePaying,
|
||||||
|
@ -416,6 +416,13 @@ export enum TalerErrorCode {
|
|||||||
*/
|
*/
|
||||||
EXCHANGE_GENERIC_GLOBAL_FEES_MISSING = 1022,
|
EXCHANGE_GENERIC_GLOBAL_FEES_MISSING = 1022,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The exchange was not properly configured with wire fees.
|
||||||
|
* Returned with an HTTP status code of #MHD_HTTP_INTERNAL_SERVER_ERROR (500).
|
||||||
|
* (A value of 0 indicates that the error is generated client-side).
|
||||||
|
*/
|
||||||
|
EXCHANGE_GENERIC_WIRE_FEES_MISSING = 1023,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The exchange did not find information about the specified transaction in the database.
|
* The exchange did not find information about the specified transaction in the database.
|
||||||
* Returned with an HTTP status code of #MHD_HTTP_NOT_FOUND (404).
|
* Returned with an HTTP status code of #MHD_HTTP_NOT_FOUND (404).
|
||||||
@ -1179,6 +1186,55 @@ export enum TalerErrorCode {
|
|||||||
*/
|
*/
|
||||||
EXCHANGE_CREATE_PURSE_NEGATIVE_VALUE_AFTER_FEE = 1860,
|
EXCHANGE_CREATE_PURSE_NEGATIVE_VALUE_AFTER_FEE = 1860,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The purse to be merged is not known.
|
||||||
|
* Returned with an HTTP status code of #MHD_HTTP_NOT_FOUND (404).
|
||||||
|
* (A value of 0 indicates that the error is generated client-side).
|
||||||
|
*/
|
||||||
|
EXCHANGE_MERGE_PURSE_NOT_FOUND = 1875,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The signature using the merge key is invalid.
|
||||||
|
* Returned with an HTTP status code of #MHD_HTTP_BAD_REQUEST (400).
|
||||||
|
* (A value of 0 indicates that the error is generated client-side).
|
||||||
|
*/
|
||||||
|
EXCHANGE_PURSE_MERGE_INVALID_MERGE_SIGNATURE = 1876,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The signature using the reserve key is invalid.
|
||||||
|
* Returned with an HTTP status code of #MHD_HTTP_BAD_REQUEST (400).
|
||||||
|
* (A value of 0 indicates that the error is generated client-side).
|
||||||
|
*/
|
||||||
|
EXCHANGE_PURSE_MERGE_INVALID_RESERVE_SIGNATURE = 1877,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The targeted purse is not yet full and thus cannot be merged. Retrying the request later may succeed.
|
||||||
|
* Returned with an HTTP status code of #MHD_HTTP_CONFLICT (409).
|
||||||
|
* (A value of 0 indicates that the error is generated client-side).
|
||||||
|
*/
|
||||||
|
EXCHANGE_PURSE_NOT_FULL = 1878,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The signature from the exchange over the confirmation is invalid.
|
||||||
|
* Returned with an HTTP status code of #MHD_HTTP_UNINITIALIZED (0).
|
||||||
|
* (A value of 0 indicates that the error is generated client-side).
|
||||||
|
*/
|
||||||
|
EXCHANGE_PURSE_MERGE_EXCHANGE_SIGNATURE_INVALID = 1879,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The exchange of the target account is not a partner of this exchange.
|
||||||
|
* Returned with an HTTP status code of #MHD_HTTP_BAD_REQUEST (400).
|
||||||
|
* (A value of 0 indicates that the error is generated client-side).
|
||||||
|
*/
|
||||||
|
EXCHANGE_MERGE_PURSE_PARTNER_UNKNOWN = 1880,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The amount in the purse is lower than the wad fee. So the request was accepted, but no transfer is expected to take place. FIXME-DOLD: good HTTP status. Suggestion: no error, make variant of 200 OK.
|
||||||
|
* Returned with an HTTP status code of #MHD_HTTP_ACCEPTED (202).
|
||||||
|
* (A value of 0 indicates that the error is generated client-side).
|
||||||
|
*/
|
||||||
|
EXCHANGE_PURSE_MERGE_WAD_FEE_EXCEEDS_PURSE_VALUE = 1881,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The auditor signature over the denomination meta data is invalid.
|
* The auditor signature over the denomination meta data is invalid.
|
||||||
* Returned with an HTTP status code of #MHD_HTTP_FORBIDDEN (403).
|
* Returned with an HTTP status code of #MHD_HTTP_FORBIDDEN (403).
|
||||||
@ -1235,6 +1291,41 @@ export enum TalerErrorCode {
|
|||||||
*/
|
*/
|
||||||
EXCHANGE_KYC_CHECK_AUTHORIZATION_FAILED = 1930,
|
EXCHANGE_KYC_CHECK_AUTHORIZATION_FAILED = 1930,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The exchange does not know a contract under the given contract public key.
|
||||||
|
* Returned with an HTTP status code of #MHD_HTTP_NOT_FOUND (404).
|
||||||
|
* (A value of 0 indicates that the error is generated client-side).
|
||||||
|
*/
|
||||||
|
EXCHANGE_CONTRACTS_UNKNOWN = 1950,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The URL does not encode a valid exchange public key in its path.
|
||||||
|
* Returned with an HTTP status code of #MHD_HTTP_BAD_REQUEST (400).
|
||||||
|
* (A value of 0 indicates that the error is generated client-side).
|
||||||
|
*/
|
||||||
|
EXCHANGE_CONTRACTS_INVALID_CONTRACT_PUB = 1951,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The returned encrypted contract did not decrypt.
|
||||||
|
* Returned with an HTTP status code of #MHD_HTTP_UNINITIALIZED (0).
|
||||||
|
* (A value of 0 indicates that the error is generated client-side).
|
||||||
|
*/
|
||||||
|
EXCHANGE_CONTRACTS_DECRYPTION_FAILED = 1952,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The signature on the encrypted contract did not validate.
|
||||||
|
* Returned with an HTTP status code of #MHD_HTTP_UNINITIALIZED (0).
|
||||||
|
* (A value of 0 indicates that the error is generated client-side).
|
||||||
|
*/
|
||||||
|
EXCHANGE_CONTRACTS_SIGNATURE_INVALID = 1953,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The decrypted contract was malformed.
|
||||||
|
* Returned with an HTTP status code of #MHD_HTTP_UNINITIALIZED (0).
|
||||||
|
* (A value of 0 indicates that the error is generated client-side).
|
||||||
|
*/
|
||||||
|
EXCHANGE_CONTRACTS_DECODING_FAILED = 1954,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The backend could not find the merchant instance specified in the request.
|
* The backend could not find the merchant instance specified in the request.
|
||||||
* Returned with an HTTP status code of #MHD_HTTP_NOT_FOUND (404).
|
* Returned with an HTTP status code of #MHD_HTTP_NOT_FOUND (404).
|
||||||
@ -2418,13 +2509,6 @@ export enum TalerErrorCode {
|
|||||||
*/
|
*/
|
||||||
ANASTASIS_TRUTH_CHALLENGE_UNKNOWN = 8112,
|
ANASTASIS_TRUTH_CHALLENGE_UNKNOWN = 8112,
|
||||||
|
|
||||||
/**
|
|
||||||
* A challenge is already active, the service is thus not issuing a new one.
|
|
||||||
* Returned with an HTTP status code of #MHD_HTTP_ALREADY_REPORTED (208).
|
|
||||||
* (A value of 0 indicates that the error is generated client-side).
|
|
||||||
*/
|
|
||||||
ANASTASIS_TRUTH_CHALLENGE_ACTIVE = 8113,
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The backend failed to initiate the authorization process.
|
* The backend failed to initiate the authorization process.
|
||||||
* Returned with an HTTP status code of #MHD_HTTP_INTERNAL_SERVER_ERROR (500).
|
* Returned with an HTTP status code of #MHD_HTTP_INTERNAL_SERVER_ERROR (500).
|
||||||
@ -2481,13 +2565,6 @@ export enum TalerErrorCode {
|
|||||||
*/
|
*/
|
||||||
ANASTASIS_TRUTH_RATE_LIMITED = 8121,
|
ANASTASIS_TRUTH_RATE_LIMITED = 8121,
|
||||||
|
|
||||||
/**
|
|
||||||
* The authentication process did not yet complete. The user should try again later.
|
|
||||||
* Returned with an HTTP status code of #MHD_HTTP_FORBIDDEN (403).
|
|
||||||
* (A value of 0 indicates that the error is generated client-side).
|
|
||||||
*/
|
|
||||||
ANASTASIS_TRUTH_AUTH_TIMEOUT = 8122,
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A request to issue a challenge is not valid for this authentication method.
|
* A request to issue a challenge is not valid for this authentication method.
|
||||||
* Returned with an HTTP status code of #MHD_HTTP_BAD_REQUEST (400).
|
* Returned with an HTTP status code of #MHD_HTTP_BAD_REQUEST (400).
|
||||||
@ -2511,7 +2588,7 @@ export enum TalerErrorCode {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* The provided phone number is not an acceptable number.
|
* The provided phone number is not an acceptable number.
|
||||||
* Returned with an HTTP status code of #MHD_HTTP_EXPECTATION_FAILED (417).
|
* Returned with an HTTP status code of #MHD_HTTP_CONFLICT (409).
|
||||||
* (A value of 0 indicates that the error is generated client-side).
|
* (A value of 0 indicates that the error is generated client-side).
|
||||||
*/
|
*/
|
||||||
ANASTASIS_SMS_PHONE_INVALID = 8200,
|
ANASTASIS_SMS_PHONE_INVALID = 8200,
|
||||||
@ -2532,7 +2609,7 @@ export enum TalerErrorCode {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* The provided email address is not an acceptable address.
|
* The provided email address is not an acceptable address.
|
||||||
* Returned with an HTTP status code of #MHD_HTTP_EXPECTATION_FAILED (417).
|
* Returned with an HTTP status code of #MHD_HTTP_CONFLICT (409).
|
||||||
* (A value of 0 indicates that the error is generated client-side).
|
* (A value of 0 indicates that the error is generated client-side).
|
||||||
*/
|
*/
|
||||||
ANASTASIS_EMAIL_INVALID = 8210,
|
ANASTASIS_EMAIL_INVALID = 8210,
|
||||||
@ -2553,7 +2630,7 @@ export enum TalerErrorCode {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* The provided postal address is not an acceptable address.
|
* The provided postal address is not an acceptable address.
|
||||||
* Returned with an HTTP status code of #MHD_HTTP_EXPECTATION_FAILED (417).
|
* Returned with an HTTP status code of #MHD_HTTP_CONFLICT (409).
|
||||||
* (A value of 0 indicates that the error is generated client-side).
|
* (A value of 0 indicates that the error is generated client-side).
|
||||||
*/
|
*/
|
||||||
ANASTASIS_POST_INVALID = 8220,
|
ANASTASIS_POST_INVALID = 8220,
|
||||||
@ -2574,21 +2651,28 @@ export enum TalerErrorCode {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* The provided IBAN address is not an acceptable IBAN.
|
* The provided IBAN address is not an acceptable IBAN.
|
||||||
* Returned with an HTTP status code of #MHD_HTTP_EXPECTATION_FAILED (417).
|
* Returned with an HTTP status code of #MHD_HTTP_CONFLICT (409).
|
||||||
* (A value of 0 indicates that the error is generated client-side).
|
* (A value of 0 indicates that the error is generated client-side).
|
||||||
*/
|
*/
|
||||||
ANASTASIS_IBAN_INVALID = 8230,
|
ANASTASIS_IBAN_INVALID = 8230,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The provider has not yet received the IBAN wire transfer authorizing the disclosure of the key share.
|
||||||
|
* Returned with an HTTP status code of #MHD_HTTP_FORBIDDEN (403).
|
||||||
|
* (A value of 0 indicates that the error is generated client-side).
|
||||||
|
*/
|
||||||
|
ANASTASIS_IBAN_MISSING_TRANSFER = 8231,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The backend did not find a TOTP key in the data provided.
|
* The backend did not find a TOTP key in the data provided.
|
||||||
* Returned with an HTTP status code of #MHD_HTTP_EXPECTATION_FAILED (417).
|
* Returned with an HTTP status code of #MHD_HTTP_CONFLICT (409).
|
||||||
* (A value of 0 indicates that the error is generated client-side).
|
* (A value of 0 indicates that the error is generated client-side).
|
||||||
*/
|
*/
|
||||||
ANASTASIS_TOTP_KEY_MISSING = 8240,
|
ANASTASIS_TOTP_KEY_MISSING = 8240,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The key provided does not satisfy the format restrictions for an Anastasis TOTP key.
|
* The key provided does not satisfy the format restrictions for an Anastasis TOTP key.
|
||||||
* Returned with an HTTP status code of #MHD_HTTP_EXPECTATION_FAILED (417).
|
* Returned with an HTTP status code of #MHD_HTTP_CONFLICT (409).
|
||||||
* (A value of 0 indicates that the error is generated client-side).
|
* (A value of 0 indicates that the error is generated client-side).
|
||||||
*/
|
*/
|
||||||
ANASTASIS_TOTP_KEY_INVALID = 8241,
|
ANASTASIS_TOTP_KEY_INVALID = 8241,
|
||||||
@ -2775,6 +2859,13 @@ export enum TalerErrorCode {
|
|||||||
*/
|
*/
|
||||||
ANASTASIS_REDUCER_INTERNAL_ERROR = 8419,
|
ANASTASIS_REDUCER_INTERNAL_ERROR = 8419,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The reducer already synchronized with all providers.
|
||||||
|
* Returned with an HTTP status code of #MHD_HTTP_UNINITIALIZED (0).
|
||||||
|
* (A value of 0 indicates that the error is generated client-side).
|
||||||
|
*/
|
||||||
|
ANASTASIS_REDUCER_PROVIDERS_ALREADY_SYNCED = 8420,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A generic error happened in the LibEuFin nexus. See the enclose details JSON for more information.
|
* A generic error happened in the LibEuFin nexus. See the enclose details JSON for more information.
|
||||||
* Returned with an HTTP status code of #MHD_HTTP_UNINITIALIZED (0).
|
* Returned with an HTTP status code of #MHD_HTTP_UNINITIALIZED (0).
|
||||||
|
Loading…
Reference in New Issue
Block a user