Compare commits
No commits in common. "69bb1fdd3fc2ac2da6112e95b681e2c3db3f720b" and "490b813f77b3806343bbdd453d5abd29db9ea037" have entirely different histories.
69bb1fdd3f
...
490b813f77
@ -29,6 +29,5 @@ copy_configure "$our_configure" ./configure
|
|||||||
copy_configure "$our_configure" ./packages/taler-wallet-cli/configure
|
copy_configure "$our_configure" ./packages/taler-wallet-cli/configure
|
||||||
copy_configure "$our_configure" ./packages/anastasis-cli/configure
|
copy_configure "$our_configure" ./packages/anastasis-cli/configure
|
||||||
copy_configure "$our_configure" ./packages/demobank-ui/configure
|
copy_configure "$our_configure" ./packages/demobank-ui/configure
|
||||||
copy_configure "$our_configure" ./packages/taler-harness/configure
|
|
||||||
copy_configure "$our_configure" ./packages/taler-util/configure
|
|
||||||
copy_configure "$our_configure" ./packages/merchant-backoffice-ui/configure
|
copy_configure "$our_configure" ./packages/merchant-backoffice-ui/configure
|
||||||
|
copy_configure "$our_configure" ./packages/taler-harness/configure
|
||||||
|
@ -581,7 +581,6 @@ deploymentCli
|
|||||||
logger.error(
|
logger.error(
|
||||||
`unable to create instance ${instanceId}, HTTP status ${createResp.status}`,
|
`unable to create instance ${instanceId}, HTTP status ${createResp.status}`,
|
||||||
);
|
);
|
||||||
process.exit(2);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const accountsUrl = new URL(
|
const accountsUrl = new URL(
|
||||||
|
@ -1,42 +0,0 @@
|
|||||||
# This Makefile has been placed in the public domain.
|
|
||||||
|
|
||||||
ifeq ($(TOPLEVEL), yes)
|
|
||||||
$(info top-level build)
|
|
||||||
-include ../../.config.mk
|
|
||||||
override DESTDIR := $(TOP_DESTDIR)
|
|
||||||
else
|
|
||||||
$(info package-level build)
|
|
||||||
-include ../../.config.mk
|
|
||||||
-include .config.mk
|
|
||||||
endif
|
|
||||||
|
|
||||||
$(info prefix is $(prefix))
|
|
||||||
|
|
||||||
all:
|
|
||||||
@echo use 'make install' to build and install taler-util
|
|
||||||
|
|
||||||
ifndef prefix
|
|
||||||
.PHONY: warn-noprefix install
|
|
||||||
warn-noprefix:
|
|
||||||
@echo "no prefix configured, did you run ./configure?"
|
|
||||||
install: warn-noprefix
|
|
||||||
else
|
|
||||||
LIBDIR = $(prefix)/share/taler-js/taler-util
|
|
||||||
NODE_DEPS = $(shell jq "(.dependencies|keys|map(\"node_modules/\" + .)|join(\" \"))" package.json -r)
|
|
||||||
.PHONY: install install-nodeps deps
|
|
||||||
install-nodeps:
|
|
||||||
pnpm compile
|
|
||||||
@echo installing taler-util to $(DESTDIR)$(prefix)
|
|
||||||
install -d $(DESTDIR)$(LIBDIR)/lib/globbing
|
|
||||||
install lib/*.* $(DESTDIR)$(LIBDIR)/lib
|
|
||||||
install lib/globbing/*.* $(DESTDIR)$(LIBDIR)/lib/globbing
|
|
||||||
install package.json $(DESTDIR)$(LIBDIR)
|
|
||||||
tar hcf - $(NODE_DEPS) | (cd $(DESTDIR)$(LIBDIR); tar xf -)
|
|
||||||
|
|
||||||
deps:
|
|
||||||
pnpm install --frozen-lockfile --filter @gnu-taler/taler-util...
|
|
||||||
pnpm run --filter @gnu-taler/taler-util... compile
|
|
||||||
install:
|
|
||||||
$(MAKE) deps
|
|
||||||
$(MAKE) install-nodeps
|
|
||||||
endif
|
|
@ -415,28 +415,24 @@ export const codecForScopeInfo = (): Codec<ScopeInfo> =>
|
|||||||
.alternative(ScopeType.Auditor, codecForScopeInfoAuditor())
|
.alternative(ScopeType.Auditor, codecForScopeInfoAuditor())
|
||||||
.build("ScopeInfo");
|
.build("ScopeInfo");
|
||||||
|
|
||||||
export interface GetCurrencySpecificationRequest {
|
export interface GetCurrencyInfoRequest {
|
||||||
scope: ScopeInfo;
|
scope: ScopeInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const codecForGetCurrencyInfoRequest =
|
export const codecForGetCurrencyInfoRequest =
|
||||||
(): Codec<GetCurrencySpecificationRequest> =>
|
(): Codec<GetCurrencyInfoRequest> =>
|
||||||
buildCodecForObject<GetCurrencySpecificationRequest>()
|
buildCodecForObject<GetCurrencyInfoRequest>()
|
||||||
.property("scope", codecForScopeInfo())
|
.property("scope", codecForScopeInfo())
|
||||||
.build("GetCurrencySpecificationRequest");
|
.build("GetCurrencyInfoRequest");
|
||||||
|
|
||||||
export interface GetCurrencySpecificationResponse {
|
export interface GetCurrencyInfoResponse {
|
||||||
currencySpecification: CurrencySpecification;
|
decimalSeparator: string;
|
||||||
}
|
numFractionalDigits: number;
|
||||||
|
numTinyDigits: number;
|
||||||
export interface CurrencySpecification {
|
/**
|
||||||
decimal_separator: string;
|
* Is the currency name leading or trailing?
|
||||||
fractional_input_digits: number;
|
*/
|
||||||
fractional_normal_digits: number;
|
isCurrencyNameLeading: boolean;
|
||||||
fractional_trailing_zero_digits: number;
|
|
||||||
is_currency_name_leading: boolean;
|
|
||||||
name: string;
|
|
||||||
alt_unit_names: { [n: number]: string };
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface InitRequest {
|
export interface InitRequest {
|
||||||
@ -1609,11 +1605,10 @@ export interface UpdateExchangeEntryRequest {
|
|||||||
exchangeBaseUrl: string;
|
exchangeBaseUrl: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const codecForUpdateExchangeEntryRequest =
|
export const codecForUpdateExchangeEntryRequest = (): Codec<UpdateExchangeEntryRequest> =>
|
||||||
(): Codec<UpdateExchangeEntryRequest> =>
|
buildCodecForObject<UpdateExchangeEntryRequest>()
|
||||||
buildCodecForObject<UpdateExchangeEntryRequest>()
|
.property("exchangeBaseUrl", codecForString())
|
||||||
.property("exchangeBaseUrl", codecForString())
|
.build("UpdateExchangeEntryRequest");
|
||||||
.build("UpdateExchangeEntryRequest");
|
|
||||||
|
|
||||||
export interface ForceExchangeUpdateRequest {
|
export interface ForceExchangeUpdateRequest {
|
||||||
exchangeBaseUrl: string;
|
exchangeBaseUrl: string;
|
||||||
|
@ -26,7 +26,7 @@ export const WALLET_EXCHANGE_PROTOCOL_VERSION = "17:0:0";
|
|||||||
*
|
*
|
||||||
* Uses libtool's current:revision:age versioning.
|
* Uses libtool's current:revision:age versioning.
|
||||||
*/
|
*/
|
||||||
export const WALLET_MERCHANT_PROTOCOL_VERSION = "5:0:1";
|
export const WALLET_MERCHANT_PROTOCOL_VERSION = "2:0:1";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Protocol version spoken with the bank.
|
* Protocol version spoken with the bank.
|
||||||
@ -40,4 +40,5 @@ export const WALLET_BANK_INTEGRATION_PROTOCOL_VERSION = "0:0:0";
|
|||||||
* Will be replaced with the value from package.json in a
|
* Will be replaced with the value from package.json in a
|
||||||
* post-compilation step (inside lib/).
|
* post-compilation step (inside lib/).
|
||||||
*/
|
*/
|
||||||
export const WALLET_CORE_IMPLEMENTATION_VERSION = "0:0:0";
|
export const WALLET_CORE_IMPLEMENTATION_VERSION =
|
||||||
|
"__WALLET_CORE_IMPLEMENTATION_VERSION__";
|
||||||
|
@ -61,8 +61,8 @@ import {
|
|||||||
GetAmountRequest,
|
GetAmountRequest,
|
||||||
GetBalanceDetailRequest,
|
GetBalanceDetailRequest,
|
||||||
GetContractTermsDetailsRequest,
|
GetContractTermsDetailsRequest,
|
||||||
GetCurrencySpecificationRequest,
|
GetCurrencyInfoRequest,
|
||||||
GetCurrencySpecificationResponse,
|
GetCurrencyInfoResponse,
|
||||||
GetExchangeTosRequest,
|
GetExchangeTosRequest,
|
||||||
GetExchangeTosResult,
|
GetExchangeTosResult,
|
||||||
GetPlanForOperationRequest,
|
GetPlanForOperationRequest,
|
||||||
@ -218,7 +218,7 @@ export enum WalletApiOperation {
|
|||||||
TestingWaitRefreshesFinal = "testingWaitRefreshesFinal",
|
TestingWaitRefreshesFinal = "testingWaitRefreshesFinal",
|
||||||
TestingWaitTransactionState = "testingWaitTransactionState",
|
TestingWaitTransactionState = "testingWaitTransactionState",
|
||||||
TestingSetTimetravel = "testingSetTimetravel",
|
TestingSetTimetravel = "testingSetTimetravel",
|
||||||
GetCurrencySpecification = "getCurrencySpecification",
|
GetScopedCurrencyInfo = "getScopedCurrencyInfo",
|
||||||
ListStoredBackups = "listStoredBackups",
|
ListStoredBackups = "listStoredBackups",
|
||||||
CreateStoredBackup = "createStoredBackup",
|
CreateStoredBackup = "createStoredBackup",
|
||||||
DeleteStoredBackup = "deleteStoredBackup",
|
DeleteStoredBackup = "deleteStoredBackup",
|
||||||
@ -627,10 +627,10 @@ export type ListCurrenciesOp = {
|
|||||||
response: WalletCurrencyInfo;
|
response: WalletCurrencyInfo;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type GetCurrencySpecificationOp = {
|
export type GetScopedCurrencyInfoOp = {
|
||||||
op: WalletApiOperation.GetCurrencySpecification;
|
op: WalletApiOperation.GetScopedCurrencyInfo;
|
||||||
request: GetCurrencySpecificationRequest;
|
request: GetCurrencyInfoRequest;
|
||||||
response: GetCurrencySpecificationResponse;
|
response: GetCurrencyInfoResponse;
|
||||||
};
|
};
|
||||||
|
|
||||||
// group: Deposits
|
// group: Deposits
|
||||||
@ -1136,7 +1136,7 @@ export type WalletOperations = {
|
|||||||
[WalletApiOperation.TestingWaitRefreshesFinal]: TestingWaitRefreshesFinal;
|
[WalletApiOperation.TestingWaitRefreshesFinal]: TestingWaitRefreshesFinal;
|
||||||
[WalletApiOperation.TestingSetTimetravel]: TestingSetTimetravelOp;
|
[WalletApiOperation.TestingSetTimetravel]: TestingSetTimetravelOp;
|
||||||
[WalletApiOperation.TestingWaitTransactionState]: TestingWaitTransactionStateOp;
|
[WalletApiOperation.TestingWaitTransactionState]: TestingWaitTransactionStateOp;
|
||||||
[WalletApiOperation.GetCurrencySpecification]: GetCurrencySpecificationOp;
|
[WalletApiOperation.GetScopedCurrencyInfo]: GetScopedCurrencyInfoOp;
|
||||||
[WalletApiOperation.CreateStoredBackup]: CreateStoredBackupsOp;
|
[WalletApiOperation.CreateStoredBackup]: CreateStoredBackupsOp;
|
||||||
[WalletApiOperation.ListStoredBackups]: ListStoredBackupsOp;
|
[WalletApiOperation.ListStoredBackups]: ListStoredBackupsOp;
|
||||||
[WalletApiOperation.DeleteStoredBackup]: DeleteStoredBackupOp;
|
[WalletApiOperation.DeleteStoredBackup]: DeleteStoredBackupOp;
|
||||||
|
@ -117,7 +117,7 @@ import {
|
|||||||
sampleWalletCoreTransactions,
|
sampleWalletCoreTransactions,
|
||||||
validateIban,
|
validateIban,
|
||||||
codecForSharePaymentRequest,
|
codecForSharePaymentRequest,
|
||||||
GetCurrencySpecificationResponse,
|
GetCurrencyInfoResponse,
|
||||||
codecForGetCurrencyInfoRequest,
|
codecForGetCurrencyInfoRequest,
|
||||||
CreateStoredBackupResponse,
|
CreateStoredBackupResponse,
|
||||||
StoredBackupList,
|
StoredBackupList,
|
||||||
@ -1427,51 +1427,16 @@ async function dispatchRequestInternal<Op extends WalletApiOperation>(
|
|||||||
await waitTransactionState(ws, req.transactionId, req.txState);
|
await waitTransactionState(ws, req.transactionId, req.txState);
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
case WalletApiOperation.GetCurrencySpecification: {
|
case WalletApiOperation.GetScopedCurrencyInfo: {
|
||||||
// Ignore result, just validate in this mock implementation
|
// Ignore result, just validate in this mock implementation
|
||||||
const req = codecForGetCurrencyInfoRequest().decode(payload);
|
codecForGetCurrencyInfoRequest().decode(payload);
|
||||||
// Hard-coded mock for KUDOS and TESTKUDOS
|
const resp: GetCurrencyInfoResponse = {
|
||||||
if (req.scope.currency === "KUDOS") {
|
decimalSeparator: ",",
|
||||||
const kudosResp: GetCurrencySpecificationResponse = {
|
isCurrencyNameLeading: false,
|
||||||
currencySpecification: {
|
numFractionalDigits: 2,
|
||||||
decimal_separator: ",",
|
numTinyDigits: 1,
|
||||||
name: "Kudos (Taler Demonstrator)",
|
|
||||||
fractional_input_digits: 2,
|
|
||||||
fractional_normal_digits: 2,
|
|
||||||
fractional_trailing_zero_digits: 2,
|
|
||||||
is_currency_name_leading: true,
|
|
||||||
alt_unit_names: {
|
|
||||||
"0": "ク",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
|
||||||
return kudosResp;
|
|
||||||
} else if (req.scope.currency === "TESTKUDOS") {
|
|
||||||
const testkudosResp: GetCurrencySpecificationResponse = {
|
|
||||||
currencySpecification: {
|
|
||||||
decimal_separator: ",",
|
|
||||||
name: "Test (Taler Unstable Demonstrator)",
|
|
||||||
fractional_input_digits: 0,
|
|
||||||
fractional_normal_digits: 0,
|
|
||||||
fractional_trailing_zero_digits: 0,
|
|
||||||
is_currency_name_leading: false,
|
|
||||||
alt_unit_names: {},
|
|
||||||
},
|
|
||||||
};
|
|
||||||
return testkudosResp;
|
|
||||||
}
|
|
||||||
const defaultResp: GetCurrencySpecificationResponse = {
|
|
||||||
currencySpecification: {
|
|
||||||
decimal_separator: ",",
|
|
||||||
name: "Unknown",
|
|
||||||
fractional_input_digits: 2,
|
|
||||||
fractional_normal_digits: 2,
|
|
||||||
fractional_trailing_zero_digits: 2,
|
|
||||||
is_currency_name_leading: true,
|
|
||||||
alt_unit_names: {},
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
return defaultResp;
|
return resp;
|
||||||
}
|
}
|
||||||
case WalletApiOperation.ImportBackupRecovery: {
|
case WalletApiOperation.ImportBackupRecovery: {
|
||||||
const req = codecForAny().decode(payload);
|
const req = codecForAny().decode(payload);
|
||||||
|
@ -17,7 +17,6 @@
|
|||||||
import {
|
import {
|
||||||
ExchangeListItem,
|
ExchangeListItem,
|
||||||
ExchangeTosStatus,
|
ExchangeTosStatus,
|
||||||
LibtoolVersion,
|
|
||||||
TranslatedString,
|
TranslatedString,
|
||||||
WalletCoreVersion,
|
WalletCoreVersion,
|
||||||
} from "@gnu-taler/taler-util";
|
} from "@gnu-taler/taler-util";
|
||||||
@ -35,18 +34,17 @@ import {
|
|||||||
LinkPrimary,
|
LinkPrimary,
|
||||||
SubTitle,
|
SubTitle,
|
||||||
SuccessText,
|
SuccessText,
|
||||||
WarningBox,
|
|
||||||
WarningText,
|
WarningText,
|
||||||
} from "../components/styled/index.js";
|
} from "../components/styled/index.js";
|
||||||
import { useAlertContext } from "../context/alert.js";
|
import { useAlertContext } from "../context/alert.js";
|
||||||
import { useBackendContext } from "../context/backend.js";
|
import { useBackendContext } from "../context/backend.js";
|
||||||
import { useAsyncAsHook } from "../hooks/useAsyncAsHook.js";
|
import { useAsyncAsHook } from "../hooks/useAsyncAsHook.js";
|
||||||
import { useBackupDeviceName } from "../hooks/useBackupDeviceName.js";
|
import { useBackupDeviceName } from "../hooks/useBackupDeviceName.js";
|
||||||
|
import { useClipboardPermissions } from "../hooks/useClipboardPermissions.js";
|
||||||
import { useSettings } from "../hooks/useSettings.js";
|
import { useSettings } from "../hooks/useSettings.js";
|
||||||
import { ToggleHandler } from "../mui/handlers.js";
|
import { ToggleHandler } from "../mui/handlers.js";
|
||||||
import { Settings } from "../platform/api.js";
|
|
||||||
import { platform } from "../platform/foreground.js";
|
import { platform } from "../platform/foreground.js";
|
||||||
import { WALLET_CORE_SUPPORTED_VERSION } from "../wxApi.js";
|
import { Settings } from "../platform/api.js";
|
||||||
|
|
||||||
const GIT_HASH = typeof __GIT_HASH__ !== "undefined" ? __GIT_HASH__ : undefined;
|
const GIT_HASH = typeof __GIT_HASH__ !== "undefined" ? __GIT_HASH__ : undefined;
|
||||||
|
|
||||||
@ -208,14 +206,7 @@ export function SettingsView({
|
|||||||
</LinkPrimary>
|
</LinkPrimary>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{coreVersion && (
|
||||||
{coreVersion && (<Fragment>
|
|
||||||
{LibtoolVersion.compare(coreVersion.version, WALLET_CORE_SUPPORTED_VERSION)?.compatible ? undefined :
|
|
||||||
<WarningBox>
|
|
||||||
<i18n.Translate>
|
|
||||||
The version of wallet core is not supported. (supported version: {WALLET_CORE_SUPPORTED_VERSION})
|
|
||||||
</i18n.Translate>
|
|
||||||
</WarningBox>}
|
|
||||||
<EnabledBySettings name="advanceMode">
|
<EnabledBySettings name="advanceMode">
|
||||||
<Part
|
<Part
|
||||||
title={i18n.str`Exchange compatibility`}
|
title={i18n.str`Exchange compatibility`}
|
||||||
@ -229,12 +220,7 @@ export function SettingsView({
|
|||||||
title={i18n.str`Bank compatibility`}
|
title={i18n.str`Bank compatibility`}
|
||||||
text={<span>{coreVersion.bank}</span>}
|
text={<span>{coreVersion.bank}</span>}
|
||||||
/>
|
/>
|
||||||
<Part
|
|
||||||
title={i18n.str`Wallet Core compatibility`}
|
|
||||||
text={<span>{coreVersion.version}</span>}
|
|
||||||
/>
|
|
||||||
</EnabledBySettings>
|
</EnabledBySettings>
|
||||||
</Fragment>
|
|
||||||
)}
|
)}
|
||||||
<SubTitle>
|
<SubTitle>
|
||||||
<i18n.Translate>Advance mode</i18n.Translate>
|
<i18n.Translate>Advance mode</i18n.Translate>
|
||||||
|
@ -53,8 +53,6 @@ import { platform } from "./platform/foreground.js";
|
|||||||
|
|
||||||
const logger = new Logger("wxApi");
|
const logger = new Logger("wxApi");
|
||||||
|
|
||||||
export const WALLET_CORE_SUPPORTED_VERSION = "0:0:0"
|
|
||||||
|
|
||||||
export interface ExtendedPermissionsResponse {
|
export interface ExtendedPermissionsResponse {
|
||||||
newValue: boolean;
|
newValue: boolean;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user