@heliofi/common 0.1.229 → 0.1.231
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/src/domain/model/fee/entities/FeeFeature.enum.d.ts +2 -1
- package/dist/src/domain/model/fee/entities/FeeFeature.enum.js +1 -0
- package/dist/src/domain/model/fee/entities/FeeFeature.enum.js.map +1 -1
- package/dist/src/domain/model/fee/entities/FeeOptions.d.ts +1 -0
- package/dist/src/domain/model/split-wallets/dtos/splitWallet.dto.d.ts +1 -1
- package/dist/src/domain/model/split-wallets/dtos/splitWallet.dto.js +1 -1
- package/dist/src/domain/model/split-wallets/dtos/splitWallet.dto.js.map +1 -1
- package/dist/src/domain/model/split-wallets/entities/SplitWallet.d.ts +1 -1
- package/dist/src/domain/services/BigIntCalculatorService.d.ts +2 -2
- package/dist/src/domain/services/BigIntCalculatorService.js +4 -4
- package/dist/src/domain/services/BigIntCalculatorService.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
|
@@ -9,5 +9,6 @@ var FeeFeature;
|
|
|
9
9
|
FeeFeature["SWAP_CONVERSION"] = "SWAP_CONVERSION";
|
|
10
10
|
FeeFeature["HELIO_PLAY"] = "HELIO_PLAY";
|
|
11
11
|
FeeFeature["REFUND"] = "REFUND";
|
|
12
|
+
FeeFeature["ESCROW"] = "ESCROW";
|
|
12
13
|
})(FeeFeature = exports.FeeFeature || (exports.FeeFeature = {}));
|
|
13
14
|
//# sourceMappingURL=FeeFeature.enum.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FeeFeature.enum.js","sourceRoot":"","sources":["../../../../../../src/domain/model/fee/entities/FeeFeature.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,
|
|
1
|
+
{"version":3,"file":"FeeFeature.enum.js","sourceRoot":"","sources":["../../../../../../src/domain/model/fee/entities/FeeFeature.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,UAWX;AAXD,WAAY,UAAU;IACpB,mCAAqB,CAAA;IACrB,uCAAyB,CAAA;IACzB,2BAAa,CAAA;IAIb,iDAAmC,CAAA;IACnC,uCAAyB,CAAA;IACzB,+BAAiB,CAAA;IACjB,+BAAiB,CAAA;AACnB,CAAC,EAXW,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAWrB"}
|
|
@@ -22,6 +22,6 @@ __decorate([
|
|
|
22
22
|
(0, class_validator_1.IsNumber)(),
|
|
23
23
|
(0, class_validator_1.IsNotEmpty)(),
|
|
24
24
|
__metadata("design:type", Number)
|
|
25
|
-
], SplitWalletDto.prototype, "
|
|
25
|
+
], SplitWalletDto.prototype, "percent", void 0);
|
|
26
26
|
exports.SplitWalletDto = SplitWalletDto;
|
|
27
27
|
//# sourceMappingURL=splitWallet.dto.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"splitWallet.dto.js","sourceRoot":"","sources":["../../../../../../src/domain/model/split-wallets/dtos/splitWallet.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAiE;AAEjE,MAAa,cAAc;CAQ1B;AAPC;IAAC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;+CACG;AAEhB;IAAC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE
|
|
1
|
+
{"version":3,"file":"splitWallet.dto.js","sourceRoot":"","sources":["../../../../../../src/domain/model/split-wallets/dtos/splitWallet.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAiE;AAEjE,MAAa,cAAc;CAQ1B;AAPC;IAAC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;+CACG;AAEhB;IAAC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;+CACG;AAPlB,wCAQC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare class BigIntCalculatorService {
|
|
2
|
-
static calculatePercentage(amount: bigint,
|
|
2
|
+
static calculatePercentage(amount: bigint, percent: number): bigint;
|
|
3
3
|
static getBigintMultiplierFromDecimals(decimals: number): bigint;
|
|
4
|
-
static calculatePercentageBalance(amount: bigint,
|
|
4
|
+
static calculatePercentageBalance(amount: bigint, percent: number): bigint;
|
|
5
5
|
}
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.BigIntCalculatorService = void 0;
|
|
4
4
|
class BigIntCalculatorService {
|
|
5
|
-
static calculatePercentage(amount,
|
|
6
|
-
return amount - (amount * BigInt(10000 -
|
|
5
|
+
static calculatePercentage(amount, percent) {
|
|
6
|
+
return amount - (amount * BigInt(10000 - percent * 100)) / 10000n;
|
|
7
7
|
}
|
|
8
8
|
static getBigintMultiplierFromDecimals(decimals) {
|
|
9
9
|
return BigInt(1 + new Array(decimals).fill(0).join(''));
|
|
10
10
|
}
|
|
11
|
-
static calculatePercentageBalance(amount,
|
|
12
|
-
return amount - (amount * BigInt(
|
|
11
|
+
static calculatePercentageBalance(amount, percent) {
|
|
12
|
+
return amount - (amount * BigInt(percent)) / 100n;
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
15
|
exports.BigIntCalculatorService = BigIntCalculatorService;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BigIntCalculatorService.js","sourceRoot":"","sources":["../../../../src/domain/services/BigIntCalculatorService.ts"],"names":[],"mappings":";;;AAAA,MAAa,uBAAuB;IAClC,MAAM,CAAC,mBAAmB,CAAC,MAAc,EAAE,
|
|
1
|
+
{"version":3,"file":"BigIntCalculatorService.js","sourceRoot":"","sources":["../../../../src/domain/services/BigIntCalculatorService.ts"],"names":[],"mappings":";;;AAAA,MAAa,uBAAuB;IAClC,MAAM,CAAC,mBAAmB,CAAC,MAAc,EAAE,OAAe;QACxD,OAAO,MAAM,GAAG,CAAC,MAAM,GAAG,MAAM,CAAC,KAAK,GAAG,OAAO,GAAG,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC;IACpE,CAAC;IAED,MAAM,CAAC,+BAA+B,CAAC,QAAgB;QACrD,OAAO,MAAM,CAAC,CAAC,GAAG,IAAI,KAAK,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC;IAC1D,CAAC;IAED,MAAM,CAAC,0BAA0B,CAAC,MAAc,EAAE,OAAe;QAC/D,OAAO,MAAM,GAAG,CAAC,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC;IACpD,CAAC;CACF;AAZD,0DAYC"}
|