@ercworldio/blockchain-shared 1.0.5-dev.0 → 1.0.5-dev.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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WalletManager.d.ts","sourceRoot":"","sources":["../../src/services/WalletManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAoC,MAAM,QAAQ,CAAC;AAClE,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAM1C,OAAO,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAIxD,OAAO,EAAe,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAClE,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,SAAS,EAAe,OAAO,EAAgB,cAAc,EAAc,MAAM,wBAAwB,CAAC;AACnH,OAAO,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AAO5D,OAAO,UAAU,MAAM,kBAAkB,CAAC;AAG1C,OAAO,gBAA+B,MAAM,2BAA2B,CAAC;AAGxE,cAAM,aAAc,SAAQ,UAAU;IAClC,MAAM,CAAC,QAAQ,EAAE,aAAa,CAAC;IAC/B,OAAO,CAAC,MAAM,CAAU;IACxB,OAAO,CAAC,MAAM,CAAgB;IACvB,wBAAwB,EAAE,MAAM,CAAC;IACjC,8BAA8B,EAAE,MAAM,CAAC;IACvC,0BAA0B,EAAE,MAAM,CAAC;IAC1C,OAAO,CAAC,MAAM,CAAS;gBACX,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,aAAa;IAelD,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,aAAa;IAOlD,SAAS,GAAU,QAAQ,MAAM,EAAE,YAAY,cAAc,KAAG,OAAO,CAAC,OAAO,GAAG,IA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AsB7F;IAEM,2BAA2B,GAAI,YAAY,cAAc,8CAoC/D;IAGM,gBAAgB,GAAU,SAAS,OAAO,EAAE,SAAS,MAAM,EAAE,EAAE,iBAAiB,eAAe,qBAqBrG;IAED,OAAO,CAAC,2BAA2B;IAa5B,YAAY,GAAU,QAAQ,MAAM,EAAE,YAAY,cAAc,EAAE,mBAAmB,MAAM,KAAG,OAAO,CAAC,OAAO,CAAC,CA4BpH;IAEY,gBAAgB,CAAC,UAAU,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM;IAsBlE,gBAAgB,CAAC,MAAM,EAAE,OAAO;;;;;;;IAoBhC,YAAY,GAAU,QAAQ,MAAM,EAAE,YAAY,cAAc;;;OAGtE;IAGM,WAAW,GAAU,cAAc,yBAAyB,EAAE,QAAQ,MAAM,EAAE,YAAY,cAAc,EAAE,iBAAiB,MAAM,EAAE,mBAAmB,MAAM,KAAG,OAAO,CAAC,OAAO,CAAC,CA8BrL;IAEM,oBAAoB,GAAU,cAAc,yBAAyB,EAAE,YAAY,cAAc,EAAE,YAAY,OAAO,EAAE,YAAY,OAAO,EAAE,SAAS,gBAAgB,sBA8B5K;IAGM,iBAAiB,GAAU,YAAY,OAAO,EAAE,YAAY,OAAO,sBAezE;IAIM,YAAY,GAAI,aAAa,MAAM,EAAE,YAAY,MAAM,EAAE,YAAY,cAAc,EAAE,YAAY,MAAM,eA4E7G;CAIJ;AAED,eAAe,aAAa,CAAC"}
|
|
@@ -147,8 +147,12 @@ class WalletManager extends errors_1.default {
|
|
|
147
147
|
let connected_funds_manager = funds_manager.connect(provider);
|
|
148
148
|
const escrowManager = new Escrow_1.default(escrow_config.addresses[0], provider, connected_funds_manager);
|
|
149
149
|
const response = yield escrowManager.fundWallets({ wallets, amount: funding_amount });
|
|
150
|
-
if (!response.transactionHash)
|
|
151
|
-
|
|
150
|
+
if (!response.transactionHash) {
|
|
151
|
+
if (response.error)
|
|
152
|
+
throw new Error(response.error.message);
|
|
153
|
+
else
|
|
154
|
+
throw new Error(`Failed to fund wallets`);
|
|
155
|
+
}
|
|
152
156
|
return response.transactionHash;
|
|
153
157
|
});
|
|
154
158
|
this.createWallet = (userId, blockchain, expiry_duration_s) => __awaiter(this, void 0, void 0, function* () {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WithdrawalService.d.ts","sourceRoot":"","sources":["../../src/services/WithdrawalService.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,IAAI,CAAC;AAC1B,OAAO,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;AACjD,OAAO,EAAoB,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAErE,cAAM,iBAAiB;IACnB,MAAM,CAAC,6BAA6B,GAAU,MAAM,IAAI,EAAE,YAAY,MAAM,4CAQ3E;IAED,MAAM,CAAC,0BAA0B,GAAU,MAAM,IAAI,EAAE,YAAY,MAAM,EAAE,SAAS,MAAM,EAAE,eAAe,MAAM,qCAUhH;IAED,MAAM,CAAC,yBAAyB,GAAU,MAAM,IAAI,EAAE,YAAY,MAAM,
|
|
1
|
+
{"version":3,"file":"WithdrawalService.d.ts","sourceRoot":"","sources":["../../src/services/WithdrawalService.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,IAAI,CAAC;AAC1B,OAAO,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;AACjD,OAAO,EAAoB,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAErE,cAAM,iBAAiB;IACnB,MAAM,CAAC,6BAA6B,GAAU,MAAM,IAAI,EAAE,YAAY,MAAM,4CAQ3E;IAED,MAAM,CAAC,0BAA0B,GAAU,MAAM,IAAI,EAAE,YAAY,MAAM,EAAE,SAAS,MAAM,EAAE,eAAe,MAAM,qCAUhH;IAED,MAAM,CAAC,yBAAyB,GAAU,MAAM,IAAI,EAAE,YAAY,MAAM,mCAYvE;CACJ;AAED,eAAe,iBAAiB,CAAC"}
|
|
@@ -28,8 +28,10 @@ WithdrawalService.get_withdrawal_commitments = (pool, blockchain, chainId, escro
|
|
|
28
28
|
});
|
|
29
29
|
WithdrawalService.get_withdrawal_commitment = (pool, request_id) => __awaiter(void 0, void 0, void 0, function* () {
|
|
30
30
|
const result = yield pool.query(`
|
|
31
|
-
SELECT
|
|
32
|
-
|
|
31
|
+
SELECT cwc.*, ccs.status
|
|
32
|
+
FROM multisig.crypto_withdrawal_commitment cwc
|
|
33
|
+
JOIN multisig.crypto_commitment_statuses ccs ON ccs.id = cwc.status_id
|
|
34
|
+
WHERE cwc.request_id = $1::bigint
|
|
33
35
|
`, [request_id]);
|
|
34
36
|
return result.rows[0];
|
|
35
37
|
});
|