payment-kit 1.25.4 → 1.25.6

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.
@@ -26,10 +26,14 @@ let cachedChainHost: string | null = null;
26
26
  */
27
27
  export async function getMigratedFromList(client: OcapClient): Promise<string[]> {
28
28
  // @ts-ignore - OcapClient has host property
29
- const chainHost = client.host || client.endpoint || 'unknown';
30
-
29
+ const chainHost = client?.config?.httpEndpoint || 'unknown';
31
30
  // If wallet address and chain host haven't changed, use cached value
32
- if (wallet.address === cachedWalletAddress && chainHost === cachedChainHost && cachedMigratedFrom !== null) {
31
+ if (
32
+ wallet.address === cachedWalletAddress &&
33
+ chainHost === cachedChainHost &&
34
+ cachedMigratedFrom &&
35
+ cachedMigratedFrom.length > 0
36
+ ) {
33
37
  return cachedMigratedFrom;
34
38
  }
35
39
 
@@ -96,6 +100,9 @@ export async function getDelegationAddressWithFallback({
96
100
  delegator,
97
101
  client,
98
102
  }: GetDelegationAddressParams): Promise<AddressWithFallbackResult | null> {
103
+ // @ts-ignore - OcapClient has host property
104
+ const chainHost = client?.config?.httpEndpoint || 'unknown';
105
+
99
106
  // 1. Check stored delegation_address first - but verify it has valid state
100
107
  if (storedAddress) {
101
108
  try {
@@ -189,6 +196,7 @@ export async function getDelegationAddressWithFallback({
189
196
  // Not found - log detailed search results
190
197
  logger.error('wallet-migration: no delegation found after full search', {
191
198
  delegator,
199
+ chainHost,
192
200
  currentWalletAddress: wallet.address,
193
201
  currentDelegationAddress: currentAddress,
194
202
  currentStateResult,
@@ -349,8 +357,8 @@ export async function backfillDelegationAddress(subId: string, address: string):
349
357
 
350
358
  // Backfill the address (only if arcblock payment_details exists with required fields)
351
359
  const existingArcblock = subscription.payment_details?.arcblock;
352
- if (!existingArcblock?.tx_hash || !existingArcblock?.payer) {
353
- logger.warn('wallet-migration: cannot backfill delegation_address - missing arcblock payment_details', {
360
+ if (!existingArcblock) {
361
+ logger.info('migration: cannot backfill delegation_address - missing arcblock payment_details', {
354
362
  subscriptionId: subscription.id,
355
363
  });
356
364
  return false;
package/blocklet.yml CHANGED
@@ -14,7 +14,7 @@ repository:
14
14
  type: git
15
15
  url: git+https://github.com/blocklet/payment-kit.git
16
16
  specVersion: 1.2.8
17
- version: 1.25.4
17
+ version: 1.25.6
18
18
  logo: logo.png
19
19
  files:
20
20
  - dist
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "payment-kit",
3
- "version": "1.25.4",
3
+ "version": "1.25.6",
4
4
  "scripts": {
5
5
  "dev": "blocklet dev --open",
6
6
  "prelint": "npm run types",
@@ -59,9 +59,9 @@
59
59
  "@blocklet/error": "^0.3.5",
60
60
  "@blocklet/js-sdk": "^1.17.8-beta-20260104-120132-cb5b1914",
61
61
  "@blocklet/logger": "^1.17.8-beta-20260104-120132-cb5b1914",
62
- "@blocklet/payment-broker-client": "1.25.4",
63
- "@blocklet/payment-react": "1.25.4",
64
- "@blocklet/payment-vendor": "1.25.4",
62
+ "@blocklet/payment-broker-client": "1.25.6",
63
+ "@blocklet/payment-react": "1.25.6",
64
+ "@blocklet/payment-vendor": "1.25.6",
65
65
  "@blocklet/sdk": "^1.17.8-beta-20260104-120132-cb5b1914",
66
66
  "@blocklet/ui-react": "^3.4.7",
67
67
  "@blocklet/uploader": "^0.3.19",
@@ -132,7 +132,7 @@
132
132
  "devDependencies": {
133
133
  "@abtnode/types": "^1.17.8-beta-20260104-120132-cb5b1914",
134
134
  "@arcblock/eslint-config-ts": "^0.3.3",
135
- "@blocklet/payment-types": "1.25.4",
135
+ "@blocklet/payment-types": "1.25.6",
136
136
  "@types/cookie-parser": "^1.4.9",
137
137
  "@types/cors": "^2.8.19",
138
138
  "@types/debug": "^4.1.12",
@@ -179,5 +179,5 @@
179
179
  "parser": "typescript"
180
180
  }
181
181
  },
182
- "gitHead": "e551d0dd9b08432ff880a33d859fa9a00c8ff649"
182
+ "gitHead": "8a1d87eed8aaa803f29b7c3c69652f2e0c467058"
183
183
  }