@pafi-dev/issuer 0.5.2 → 0.5.3
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.cjs +12 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -4
- package/dist/index.d.ts +7 -4
- package/dist/index.js +12 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1964,6 +1964,7 @@ var PafiBackendClient = class {
|
|
|
1964
1964
|
|
|
1965
1965
|
// src/config.ts
|
|
1966
1966
|
var import_viem10 = require("viem");
|
|
1967
|
+
var import_core7 = require("@pafi-dev/core");
|
|
1967
1968
|
function createIssuerService(config) {
|
|
1968
1969
|
if (!config.provider) {
|
|
1969
1970
|
throw new Error("createIssuerService: provider is required");
|
|
@@ -2030,13 +2031,22 @@ function createIssuerService(config) {
|
|
|
2030
2031
|
indexers.set(tokenAddress, new PointIndexer(indexerConfig));
|
|
2031
2032
|
}
|
|
2032
2033
|
const firstIndexer = indexers.get(tokenAddresses[0]);
|
|
2034
|
+
const chainAddresses = (0, import_core7.getContractAddresses)(config.chainId);
|
|
2035
|
+
const resolvedContracts = {
|
|
2036
|
+
batchExecutor: chainAddresses.batchExecutor,
|
|
2037
|
+
usdt: chainAddresses.usdt,
|
|
2038
|
+
issuerRegistry: chainAddresses.issuerRegistry,
|
|
2039
|
+
mintingOracle: chainAddresses.mintingOracle,
|
|
2040
|
+
pafiHook: chainAddresses.pafiHook,
|
|
2041
|
+
...config.contracts
|
|
2042
|
+
};
|
|
2033
2043
|
const handlersConfig = {
|
|
2034
2044
|
authService,
|
|
2035
2045
|
ledger,
|
|
2036
2046
|
provider: config.provider,
|
|
2037
2047
|
pointTokenAddresses: tokenAddresses,
|
|
2038
2048
|
chainId: config.chainId,
|
|
2039
|
-
contracts:
|
|
2049
|
+
contracts: resolvedContracts
|
|
2040
2050
|
};
|
|
2041
2051
|
if (feeManager) handlersConfig.feeManager = feeManager;
|
|
2042
2052
|
if (config.poolsProvider) handlersConfig.poolsProvider = config.poolsProvider;
|
|
@@ -2045,7 +2055,7 @@ function createIssuerService(config) {
|
|
|
2045
2055
|
policy,
|
|
2046
2056
|
relayService,
|
|
2047
2057
|
issuerSignerWallet: config.claim.issuerSignerWallet,
|
|
2048
|
-
batchExecutorAddress: config.claim.batchExecutorAddress,
|
|
2058
|
+
batchExecutorAddress: config.claim.batchExecutorAddress ?? chainAddresses.batchExecutor,
|
|
2049
2059
|
lockDurationMs: config.claim.lockDurationMs
|
|
2050
2060
|
};
|
|
2051
2061
|
}
|