@toon-protocol/client 0.26.1 → 0.26.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5031,11 +5031,12 @@ async function initializeHttpMode(config) {
|
|
|
5031
5031
|
supportsUpgrade: config.connectorSupportsUpgrade
|
|
5032
5032
|
});
|
|
5033
5033
|
const transportChoice = discoveredPeer.httpEndpoint || discoveredPeer.btpEndpoint ? selectIlpTransport(discoveredPeer, { needsDuplex: false }) : null;
|
|
5034
|
+
const btpPeerId = config.btpPeerId ?? config.ilpInfo.ilpAddress;
|
|
5034
5035
|
let btpClient = null;
|
|
5035
5036
|
if (effectiveBtpUrl) {
|
|
5036
5037
|
btpClient = new BtpRuntimeClient({
|
|
5037
5038
|
btpUrl: effectiveBtpUrl,
|
|
5038
|
-
peerId:
|
|
5039
|
+
peerId: btpPeerId,
|
|
5039
5040
|
authToken: config.btpAuthToken ?? "",
|
|
5040
5041
|
// Serve-side job registration (toon-client#494): a connector-originated
|
|
5041
5042
|
// MESSAGE carrying a PREPARE is answered by the configured handler.
|
|
@@ -5049,7 +5050,7 @@ async function initializeHttpMode(config) {
|
|
|
5049
5050
|
if (transportChoice && (transportChoice.kind === "http" || transportChoice.kind === "http-upgradable")) {
|
|
5050
5051
|
httpIlpClient = new HttpIlpClient({
|
|
5051
5052
|
httpEndpoint: transportChoice.httpEndpoint,
|
|
5052
|
-
|
|
5053
|
+
peerId: btpPeerId,
|
|
5053
5054
|
...config.btpAuthToken !== void 0 ? { authToken: config.btpAuthToken } : {},
|
|
5054
5055
|
timeout: config.queryTimeout,
|
|
5055
5056
|
maxRetries: config.maxRetries,
|