@metamask-previews/perps-controller 22.1.2-preview-2c49dc768 → 22.1.2-preview-4a5ac306d
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/CHANGELOG.md +16 -11
- package/dist/PerpsController-method-action-types.d.ts +5 -7
- package/dist/PerpsController-method-action-types.d.ts.map +1 -1
- package/dist/PerpsController-method-action-types.js.map +1 -1
- package/dist/PerpsController.d.ts +5 -7
- package/dist/PerpsController.d.ts.map +1 -1
- package/dist/PerpsController.js +5 -7
- package/dist/PerpsController.js.map +1 -1
- package/dist/constants/perpsConfig.d.ts +22 -0
- package/dist/constants/perpsConfig.d.ts.map +1 -1
- package/dist/constants/perpsConfig.js +18 -0
- package/dist/constants/perpsConfig.js.map +1 -1
- package/dist/errors.d.ts +2 -13
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +2 -2
- package/dist/errors.js.map +1 -1
- package/dist/index.d.ts +6 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/perpsErrorCodes.d.ts +0 -2
- package/dist/perpsErrorCodes.d.ts.map +1 -1
- package/dist/perpsErrorCodes.js +0 -3
- package/dist/perpsErrorCodes.js.map +1 -1
- package/dist/providers/AggregatedPerpsProvider.d.ts.map +1 -1
- package/dist/providers/AggregatedPerpsProvider.js +5 -6
- package/dist/providers/AggregatedPerpsProvider.js.map +1 -1
- package/dist/providers/HyperLiquidProvider.d.ts.map +1 -1
- package/dist/providers/HyperLiquidProvider.js +133 -107
- package/dist/providers/HyperLiquidProvider.js.map +1 -1
- package/dist/services/TradingService.d.ts.map +1 -1
- package/dist/services/TradingService.js +4 -7
- package/dist/services/TradingService.js.map +1 -1
- package/dist/types/index.d.ts +1 -36
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js.map +1 -1
- package/dist/utils/accountUtils.d.ts +61 -0
- package/dist/utils/accountUtils.d.ts.map +1 -1
- package/dist/utils/accountUtils.js +50 -0
- package/dist/utils/accountUtils.js.map +1 -1
- package/dist/utils/errorContext.d.ts +0 -33
- package/dist/utils/errorContext.d.ts.map +1 -1
- package/dist/utils/errorContext.js +0 -41
- package/dist/utils/errorContext.js.map +1 -1
- package/dist/utils/errorUtils.d.ts +0 -18
- package/dist/utils/errorUtils.d.ts.map +1 -1
- package/dist/utils/errorUtils.js +1 -127
- package/dist/utils/errorUtils.js.map +1 -1
- package/dist/utils/hyperLiquidValidation.d.ts +2 -9
- package/dist/utils/hyperLiquidValidation.d.ts.map +1 -1
- package/dist/utils/hyperLiquidValidation.js +17 -18
- package/dist/utils/hyperLiquidValidation.js.map +1 -1
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +1 -0
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/significantFigures.d.ts.map +1 -1
- package/dist/utils/significantFigures.js +4 -6
- package/dist/utils/significantFigures.js.map +1 -1
- package/dist/utils/stringParseUtils.d.ts +8 -0
- package/dist/utils/stringParseUtils.d.ts.map +1 -1
- package/dist/utils/stringParseUtils.js +10 -0
- package/dist/utils/stringParseUtils.js.map +1 -1
- package/dist/utils/tpslCalculations.d.ts +187 -0
- package/dist/utils/tpslCalculations.d.ts.map +1 -0
- package/dist/utils/tpslCalculations.js +405 -0
- package/dist/utils/tpslCalculations.js.map +1 -0
- package/package.json +2 -2
package/dist/PerpsController.js
CHANGED
|
@@ -5129,13 +5129,11 @@ export class PerpsController extends BaseController {
|
|
|
5129
5129
|
* - `NO_ACCOUNT_SELECTED` when no account is selected;
|
|
5130
5130
|
* - `PROVIDER_LIFECYCLE_STALE` when the provider disconnected or the account
|
|
5131
5131
|
* changed during setup;
|
|
5132
|
-
* -
|
|
5133
|
-
*
|
|
5134
|
-
*
|
|
5135
|
-
*
|
|
5136
|
-
*
|
|
5137
|
-
* - otherwise a provider-tagged code for the error that stopped setup,
|
|
5138
|
-
* which is logged. Text that is not a known code becomes `UNKNOWN_ERROR`.
|
|
5132
|
+
* - the venue's message when HyperLiquid refused the builder fee approval
|
|
5133
|
+
* for a reason signing again cannot fix (for example "Builder has
|
|
5134
|
+
* insufficient balance to be approved"); it is not logged, and the
|
|
5135
|
+
* approval is not asked for again until the provider disconnects;
|
|
5136
|
+
* - otherwise the message of the error that stopped setup, which is logged.
|
|
5139
5137
|
* @throws Like the other provider-backed actions, `CLIENT_NOT_INITIALIZED`
|
|
5140
5138
|
* before `init`, and `CLIENT_REINITIALIZING` or `PROVIDER_NOT_AVAILABLE`
|
|
5141
5139
|
* when no active provider is available.
|