versions for android

This commit is contained in:
Florian Dold 2020-05-12 15:51:40 +05:30
parent 67dd0eb06e
commit b504a5218a
No known key found for this signature in database
GPG Key ID: D2E4F00F29D02A4B
2 changed files with 15 additions and 3 deletions

View File

@ -33,6 +33,7 @@ import {
} from "../util/http"; } from "../util/http";
import { NodeHttpLib } from "../headless/NodeHttpLib"; import { NodeHttpLib } from "../headless/NodeHttpLib";
import { WalletNotification } from "../types/notifications"; import { WalletNotification } from "../types/notifications";
import { WALLET_EXCHANGE_PROTOCOL_VERSION, WALLET_MERCHANT_PROTOCOL_VERSION } from "../operations/versions";
// @ts-ignore: special built-in module // @ts-ignore: special built-in module
//import akono = require("akono"); //import akono = require("akono");
@ -154,7 +155,12 @@ class AndroidWalletMessageHandler {
console.error("Error during wallet retry loop", e); console.error("Error during wallet retry loop", e);
}); });
this.wp.resolve(w); this.wp.resolve(w);
return {}; return {
supported_protocol_versions: {
exchange: WALLET_EXCHANGE_PROTOCOL_VERSION,
merchant: WALLET_MERCHANT_PROTOCOL_VERSION,
}
};
} }
case "abortProposal": { case "abortProposal": {
const wallet = await this.wp.promise; const wallet = await this.wp.promise;

View File

@ -15,13 +15,19 @@
*/ */
/** /**
* Wallet protocol version spoken with the exchange * Protocol version spoken with the exchange.
* and merchant.
* *
* Uses libtool's current:revision:age versioning. * Uses libtool's current:revision:age versioning.
*/ */
export const WALLET_EXCHANGE_PROTOCOL_VERSION = "7:0:0"; export const WALLET_EXCHANGE_PROTOCOL_VERSION = "7:0:0";
/**
* Protocol version spoken with the merchant.
*
* Uses libtool's current:revision:age versioning.
*/
export const WALLET_MERCHANT_PROTOCOL_VERSION = "0:0:0";
/** /**
* Cache breaker that is appended to queries such as /keys and /wire * Cache breaker that is appended to queries such as /keys and /wire
* to break through caching, if it has been accidentally/badly configured * to break through caching, if it has been accidentally/badly configured