@stakekit/widget 0.0.125 → 0.0.126
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.
|
@@ -3582,13 +3582,13 @@ var SettingsContextProvider = ({
|
|
|
3582
3582
|
return /* @__PURE__ */ jsx(SettingsContext.Provider, { value, children });
|
|
3583
3583
|
};
|
|
3584
3584
|
var useSettings = () => {
|
|
3585
|
-
const
|
|
3586
|
-
if (!
|
|
3585
|
+
const context2 = useContext(SettingsContext);
|
|
3586
|
+
if (!context2) {
|
|
3587
3587
|
throw new Error(
|
|
3588
3588
|
"useSettings must be used within a SettingsContextProvider"
|
|
3589
3589
|
);
|
|
3590
3590
|
}
|
|
3591
|
-
return
|
|
3591
|
+
return context2;
|
|
3592
3592
|
};
|
|
3593
3593
|
|
|
3594
3594
|
// node_modules/@stakekit/api-hooks/dist/chunk-T2YKRUIH.js
|
|
@@ -3616,7 +3616,7 @@ var useApiClient = () => {
|
|
|
3616
3616
|
};
|
|
3617
3617
|
var useApi = () => {
|
|
3618
3618
|
const apiClient = useApiClient();
|
|
3619
|
-
return (
|
|
3619
|
+
return (config3) => apiClient(config3).then((response) => response.data);
|
|
3620
3620
|
};
|
|
3621
3621
|
var useActionGetGasEstimateHook = () => {
|
|
3622
3622
|
const actionGetGasEstimate = useApi();
|
|
@@ -3968,9 +3968,9 @@ var checkDelay = () => {
|
|
|
3968
3968
|
unsub = subscribe(() => res(null));
|
|
3969
3969
|
}).then(() => unsub());
|
|
3970
3970
|
};
|
|
3971
|
-
var attachDelayInterceptor = (apiClient) => apiClient.interceptors.request.use(async (
|
|
3971
|
+
var attachDelayInterceptor = (apiClient) => apiClient.interceptors.request.use(async (config3) => {
|
|
3972
3972
|
await checkDelay();
|
|
3973
|
-
return
|
|
3973
|
+
return config3;
|
|
3974
3974
|
});
|
|
3975
3975
|
var delayAPIRequests = () => {
|
|
3976
3976
|
if (config.env.isTestMode)
|
|
@@ -4021,7 +4021,843 @@ var useGeoBlock = () => useSyncExternalStore(
|
|
|
4021
4021
|
|
|
4022
4022
|
// src/hooks/use-rich-errors.ts
|
|
4023
4023
|
import { useCallback as useCallback2, useSyncExternalStore as useSyncExternalStore2 } from "react";
|
|
4024
|
-
|
|
4024
|
+
|
|
4025
|
+
// node_modules/rxjs/dist/esm5/internal/Subscriber.js
|
|
4026
|
+
import { __extends } from "tslib";
|
|
4027
|
+
|
|
4028
|
+
// node_modules/rxjs/dist/esm5/internal/util/isFunction.js
|
|
4029
|
+
function isFunction(value) {
|
|
4030
|
+
return typeof value === "function";
|
|
4031
|
+
}
|
|
4032
|
+
|
|
4033
|
+
// node_modules/rxjs/dist/esm5/internal/Subscription.js
|
|
4034
|
+
import { __read, __spreadArray, __values } from "tslib";
|
|
4035
|
+
|
|
4036
|
+
// node_modules/rxjs/dist/esm5/internal/util/createErrorClass.js
|
|
4037
|
+
function createErrorClass(createImpl) {
|
|
4038
|
+
var _super = function(instance) {
|
|
4039
|
+
Error.call(instance);
|
|
4040
|
+
instance.stack = new Error().stack;
|
|
4041
|
+
};
|
|
4042
|
+
var ctorFunc = createImpl(_super);
|
|
4043
|
+
ctorFunc.prototype = Object.create(Error.prototype);
|
|
4044
|
+
ctorFunc.prototype.constructor = ctorFunc;
|
|
4045
|
+
return ctorFunc;
|
|
4046
|
+
}
|
|
4047
|
+
|
|
4048
|
+
// node_modules/rxjs/dist/esm5/internal/util/UnsubscriptionError.js
|
|
4049
|
+
var UnsubscriptionError = createErrorClass(function(_super) {
|
|
4050
|
+
return function UnsubscriptionErrorImpl(errors) {
|
|
4051
|
+
_super(this);
|
|
4052
|
+
this.message = errors ? errors.length + " errors occurred during unsubscription:\n" + errors.map(function(err, i) {
|
|
4053
|
+
return i + 1 + ") " + err.toString();
|
|
4054
|
+
}).join("\n ") : "";
|
|
4055
|
+
this.name = "UnsubscriptionError";
|
|
4056
|
+
this.errors = errors;
|
|
4057
|
+
};
|
|
4058
|
+
});
|
|
4059
|
+
|
|
4060
|
+
// node_modules/rxjs/dist/esm5/internal/util/arrRemove.js
|
|
4061
|
+
function arrRemove(arr, item) {
|
|
4062
|
+
if (arr) {
|
|
4063
|
+
var index = arr.indexOf(item);
|
|
4064
|
+
0 <= index && arr.splice(index, 1);
|
|
4065
|
+
}
|
|
4066
|
+
}
|
|
4067
|
+
|
|
4068
|
+
// node_modules/rxjs/dist/esm5/internal/Subscription.js
|
|
4069
|
+
var Subscription = function() {
|
|
4070
|
+
function Subscription2(initialTeardown) {
|
|
4071
|
+
this.initialTeardown = initialTeardown;
|
|
4072
|
+
this.closed = false;
|
|
4073
|
+
this._parentage = null;
|
|
4074
|
+
this._finalizers = null;
|
|
4075
|
+
}
|
|
4076
|
+
Subscription2.prototype.unsubscribe = function() {
|
|
4077
|
+
var e_1, _a2, e_2, _b;
|
|
4078
|
+
var errors;
|
|
4079
|
+
if (!this.closed) {
|
|
4080
|
+
this.closed = true;
|
|
4081
|
+
var _parentage = this._parentage;
|
|
4082
|
+
if (_parentage) {
|
|
4083
|
+
this._parentage = null;
|
|
4084
|
+
if (Array.isArray(_parentage)) {
|
|
4085
|
+
try {
|
|
4086
|
+
for (var _parentage_1 = __values(_parentage), _parentage_1_1 = _parentage_1.next(); !_parentage_1_1.done; _parentage_1_1 = _parentage_1.next()) {
|
|
4087
|
+
var parent_1 = _parentage_1_1.value;
|
|
4088
|
+
parent_1.remove(this);
|
|
4089
|
+
}
|
|
4090
|
+
} catch (e_1_1) {
|
|
4091
|
+
e_1 = { error: e_1_1 };
|
|
4092
|
+
} finally {
|
|
4093
|
+
try {
|
|
4094
|
+
if (_parentage_1_1 && !_parentage_1_1.done && (_a2 = _parentage_1.return))
|
|
4095
|
+
_a2.call(_parentage_1);
|
|
4096
|
+
} finally {
|
|
4097
|
+
if (e_1)
|
|
4098
|
+
throw e_1.error;
|
|
4099
|
+
}
|
|
4100
|
+
}
|
|
4101
|
+
} else {
|
|
4102
|
+
_parentage.remove(this);
|
|
4103
|
+
}
|
|
4104
|
+
}
|
|
4105
|
+
var initialFinalizer = this.initialTeardown;
|
|
4106
|
+
if (isFunction(initialFinalizer)) {
|
|
4107
|
+
try {
|
|
4108
|
+
initialFinalizer();
|
|
4109
|
+
} catch (e) {
|
|
4110
|
+
errors = e instanceof UnsubscriptionError ? e.errors : [e];
|
|
4111
|
+
}
|
|
4112
|
+
}
|
|
4113
|
+
var _finalizers = this._finalizers;
|
|
4114
|
+
if (_finalizers) {
|
|
4115
|
+
this._finalizers = null;
|
|
4116
|
+
try {
|
|
4117
|
+
for (var _finalizers_1 = __values(_finalizers), _finalizers_1_1 = _finalizers_1.next(); !_finalizers_1_1.done; _finalizers_1_1 = _finalizers_1.next()) {
|
|
4118
|
+
var finalizer = _finalizers_1_1.value;
|
|
4119
|
+
try {
|
|
4120
|
+
execFinalizer(finalizer);
|
|
4121
|
+
} catch (err) {
|
|
4122
|
+
errors = errors !== null && errors !== void 0 ? errors : [];
|
|
4123
|
+
if (err instanceof UnsubscriptionError) {
|
|
4124
|
+
errors = __spreadArray(__spreadArray([], __read(errors)), __read(err.errors));
|
|
4125
|
+
} else {
|
|
4126
|
+
errors.push(err);
|
|
4127
|
+
}
|
|
4128
|
+
}
|
|
4129
|
+
}
|
|
4130
|
+
} catch (e_2_1) {
|
|
4131
|
+
e_2 = { error: e_2_1 };
|
|
4132
|
+
} finally {
|
|
4133
|
+
try {
|
|
4134
|
+
if (_finalizers_1_1 && !_finalizers_1_1.done && (_b = _finalizers_1.return))
|
|
4135
|
+
_b.call(_finalizers_1);
|
|
4136
|
+
} finally {
|
|
4137
|
+
if (e_2)
|
|
4138
|
+
throw e_2.error;
|
|
4139
|
+
}
|
|
4140
|
+
}
|
|
4141
|
+
}
|
|
4142
|
+
if (errors) {
|
|
4143
|
+
throw new UnsubscriptionError(errors);
|
|
4144
|
+
}
|
|
4145
|
+
}
|
|
4146
|
+
};
|
|
4147
|
+
Subscription2.prototype.add = function(teardown) {
|
|
4148
|
+
var _a2;
|
|
4149
|
+
if (teardown && teardown !== this) {
|
|
4150
|
+
if (this.closed) {
|
|
4151
|
+
execFinalizer(teardown);
|
|
4152
|
+
} else {
|
|
4153
|
+
if (teardown instanceof Subscription2) {
|
|
4154
|
+
if (teardown.closed || teardown._hasParent(this)) {
|
|
4155
|
+
return;
|
|
4156
|
+
}
|
|
4157
|
+
teardown._addParent(this);
|
|
4158
|
+
}
|
|
4159
|
+
(this._finalizers = (_a2 = this._finalizers) !== null && _a2 !== void 0 ? _a2 : []).push(teardown);
|
|
4160
|
+
}
|
|
4161
|
+
}
|
|
4162
|
+
};
|
|
4163
|
+
Subscription2.prototype._hasParent = function(parent) {
|
|
4164
|
+
var _parentage = this._parentage;
|
|
4165
|
+
return _parentage === parent || Array.isArray(_parentage) && _parentage.includes(parent);
|
|
4166
|
+
};
|
|
4167
|
+
Subscription2.prototype._addParent = function(parent) {
|
|
4168
|
+
var _parentage = this._parentage;
|
|
4169
|
+
this._parentage = Array.isArray(_parentage) ? (_parentage.push(parent), _parentage) : _parentage ? [_parentage, parent] : parent;
|
|
4170
|
+
};
|
|
4171
|
+
Subscription2.prototype._removeParent = function(parent) {
|
|
4172
|
+
var _parentage = this._parentage;
|
|
4173
|
+
if (_parentage === parent) {
|
|
4174
|
+
this._parentage = null;
|
|
4175
|
+
} else if (Array.isArray(_parentage)) {
|
|
4176
|
+
arrRemove(_parentage, parent);
|
|
4177
|
+
}
|
|
4178
|
+
};
|
|
4179
|
+
Subscription2.prototype.remove = function(teardown) {
|
|
4180
|
+
var _finalizers = this._finalizers;
|
|
4181
|
+
_finalizers && arrRemove(_finalizers, teardown);
|
|
4182
|
+
if (teardown instanceof Subscription2) {
|
|
4183
|
+
teardown._removeParent(this);
|
|
4184
|
+
}
|
|
4185
|
+
};
|
|
4186
|
+
Subscription2.EMPTY = function() {
|
|
4187
|
+
var empty = new Subscription2();
|
|
4188
|
+
empty.closed = true;
|
|
4189
|
+
return empty;
|
|
4190
|
+
}();
|
|
4191
|
+
return Subscription2;
|
|
4192
|
+
}();
|
|
4193
|
+
var EMPTY_SUBSCRIPTION = Subscription.EMPTY;
|
|
4194
|
+
function isSubscription(value) {
|
|
4195
|
+
return value instanceof Subscription || value && "closed" in value && isFunction(value.remove) && isFunction(value.add) && isFunction(value.unsubscribe);
|
|
4196
|
+
}
|
|
4197
|
+
function execFinalizer(finalizer) {
|
|
4198
|
+
if (isFunction(finalizer)) {
|
|
4199
|
+
finalizer();
|
|
4200
|
+
} else {
|
|
4201
|
+
finalizer.unsubscribe();
|
|
4202
|
+
}
|
|
4203
|
+
}
|
|
4204
|
+
|
|
4205
|
+
// node_modules/rxjs/dist/esm5/internal/config.js
|
|
4206
|
+
var config2 = {
|
|
4207
|
+
onUnhandledError: null,
|
|
4208
|
+
onStoppedNotification: null,
|
|
4209
|
+
Promise: void 0,
|
|
4210
|
+
useDeprecatedSynchronousErrorHandling: false,
|
|
4211
|
+
useDeprecatedNextContext: false
|
|
4212
|
+
};
|
|
4213
|
+
|
|
4214
|
+
// node_modules/rxjs/dist/esm5/internal/scheduler/timeoutProvider.js
|
|
4215
|
+
import { __read as __read2, __spreadArray as __spreadArray2 } from "tslib";
|
|
4216
|
+
var timeoutProvider = {
|
|
4217
|
+
setTimeout: function(handler, timeout) {
|
|
4218
|
+
var args = [];
|
|
4219
|
+
for (var _i = 2; _i < arguments.length; _i++) {
|
|
4220
|
+
args[_i - 2] = arguments[_i];
|
|
4221
|
+
}
|
|
4222
|
+
var delegate = timeoutProvider.delegate;
|
|
4223
|
+
if (delegate === null || delegate === void 0 ? void 0 : delegate.setTimeout) {
|
|
4224
|
+
return delegate.setTimeout.apply(delegate, __spreadArray2([handler, timeout], __read2(args)));
|
|
4225
|
+
}
|
|
4226
|
+
return setTimeout.apply(void 0, __spreadArray2([handler, timeout], __read2(args)));
|
|
4227
|
+
},
|
|
4228
|
+
clearTimeout: function(handle) {
|
|
4229
|
+
var delegate = timeoutProvider.delegate;
|
|
4230
|
+
return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearTimeout) || clearTimeout)(handle);
|
|
4231
|
+
},
|
|
4232
|
+
delegate: void 0
|
|
4233
|
+
};
|
|
4234
|
+
|
|
4235
|
+
// node_modules/rxjs/dist/esm5/internal/util/reportUnhandledError.js
|
|
4236
|
+
function reportUnhandledError(err) {
|
|
4237
|
+
timeoutProvider.setTimeout(function() {
|
|
4238
|
+
var onUnhandledError = config2.onUnhandledError;
|
|
4239
|
+
if (onUnhandledError) {
|
|
4240
|
+
onUnhandledError(err);
|
|
4241
|
+
} else {
|
|
4242
|
+
throw err;
|
|
4243
|
+
}
|
|
4244
|
+
});
|
|
4245
|
+
}
|
|
4246
|
+
|
|
4247
|
+
// node_modules/rxjs/dist/esm5/internal/util/noop.js
|
|
4248
|
+
function noop() {
|
|
4249
|
+
}
|
|
4250
|
+
|
|
4251
|
+
// node_modules/rxjs/dist/esm5/internal/NotificationFactories.js
|
|
4252
|
+
var COMPLETE_NOTIFICATION = function() {
|
|
4253
|
+
return createNotification("C", void 0, void 0);
|
|
4254
|
+
}();
|
|
4255
|
+
function errorNotification(error) {
|
|
4256
|
+
return createNotification("E", void 0, error);
|
|
4257
|
+
}
|
|
4258
|
+
function nextNotification(value) {
|
|
4259
|
+
return createNotification("N", value, void 0);
|
|
4260
|
+
}
|
|
4261
|
+
function createNotification(kind, value, error) {
|
|
4262
|
+
return {
|
|
4263
|
+
kind,
|
|
4264
|
+
value,
|
|
4265
|
+
error
|
|
4266
|
+
};
|
|
4267
|
+
}
|
|
4268
|
+
|
|
4269
|
+
// node_modules/rxjs/dist/esm5/internal/util/errorContext.js
|
|
4270
|
+
var context = null;
|
|
4271
|
+
function errorContext(cb) {
|
|
4272
|
+
if (config2.useDeprecatedSynchronousErrorHandling) {
|
|
4273
|
+
var isRoot = !context;
|
|
4274
|
+
if (isRoot) {
|
|
4275
|
+
context = { errorThrown: false, error: null };
|
|
4276
|
+
}
|
|
4277
|
+
cb();
|
|
4278
|
+
if (isRoot) {
|
|
4279
|
+
var _a2 = context, errorThrown = _a2.errorThrown, error = _a2.error;
|
|
4280
|
+
context = null;
|
|
4281
|
+
if (errorThrown) {
|
|
4282
|
+
throw error;
|
|
4283
|
+
}
|
|
4284
|
+
}
|
|
4285
|
+
} else {
|
|
4286
|
+
cb();
|
|
4287
|
+
}
|
|
4288
|
+
}
|
|
4289
|
+
function captureError(err) {
|
|
4290
|
+
if (config2.useDeprecatedSynchronousErrorHandling && context) {
|
|
4291
|
+
context.errorThrown = true;
|
|
4292
|
+
context.error = err;
|
|
4293
|
+
}
|
|
4294
|
+
}
|
|
4295
|
+
|
|
4296
|
+
// node_modules/rxjs/dist/esm5/internal/Subscriber.js
|
|
4297
|
+
var Subscriber = function(_super) {
|
|
4298
|
+
__extends(Subscriber2, _super);
|
|
4299
|
+
function Subscriber2(destination) {
|
|
4300
|
+
var _this = _super.call(this) || this;
|
|
4301
|
+
_this.isStopped = false;
|
|
4302
|
+
if (destination) {
|
|
4303
|
+
_this.destination = destination;
|
|
4304
|
+
if (isSubscription(destination)) {
|
|
4305
|
+
destination.add(_this);
|
|
4306
|
+
}
|
|
4307
|
+
} else {
|
|
4308
|
+
_this.destination = EMPTY_OBSERVER;
|
|
4309
|
+
}
|
|
4310
|
+
return _this;
|
|
4311
|
+
}
|
|
4312
|
+
Subscriber2.create = function(next, error, complete) {
|
|
4313
|
+
return new SafeSubscriber(next, error, complete);
|
|
4314
|
+
};
|
|
4315
|
+
Subscriber2.prototype.next = function(value) {
|
|
4316
|
+
if (this.isStopped) {
|
|
4317
|
+
handleStoppedNotification(nextNotification(value), this);
|
|
4318
|
+
} else {
|
|
4319
|
+
this._next(value);
|
|
4320
|
+
}
|
|
4321
|
+
};
|
|
4322
|
+
Subscriber2.prototype.error = function(err) {
|
|
4323
|
+
if (this.isStopped) {
|
|
4324
|
+
handleStoppedNotification(errorNotification(err), this);
|
|
4325
|
+
} else {
|
|
4326
|
+
this.isStopped = true;
|
|
4327
|
+
this._error(err);
|
|
4328
|
+
}
|
|
4329
|
+
};
|
|
4330
|
+
Subscriber2.prototype.complete = function() {
|
|
4331
|
+
if (this.isStopped) {
|
|
4332
|
+
handleStoppedNotification(COMPLETE_NOTIFICATION, this);
|
|
4333
|
+
} else {
|
|
4334
|
+
this.isStopped = true;
|
|
4335
|
+
this._complete();
|
|
4336
|
+
}
|
|
4337
|
+
};
|
|
4338
|
+
Subscriber2.prototype.unsubscribe = function() {
|
|
4339
|
+
if (!this.closed) {
|
|
4340
|
+
this.isStopped = true;
|
|
4341
|
+
_super.prototype.unsubscribe.call(this);
|
|
4342
|
+
this.destination = null;
|
|
4343
|
+
}
|
|
4344
|
+
};
|
|
4345
|
+
Subscriber2.prototype._next = function(value) {
|
|
4346
|
+
this.destination.next(value);
|
|
4347
|
+
};
|
|
4348
|
+
Subscriber2.prototype._error = function(err) {
|
|
4349
|
+
try {
|
|
4350
|
+
this.destination.error(err);
|
|
4351
|
+
} finally {
|
|
4352
|
+
this.unsubscribe();
|
|
4353
|
+
}
|
|
4354
|
+
};
|
|
4355
|
+
Subscriber2.prototype._complete = function() {
|
|
4356
|
+
try {
|
|
4357
|
+
this.destination.complete();
|
|
4358
|
+
} finally {
|
|
4359
|
+
this.unsubscribe();
|
|
4360
|
+
}
|
|
4361
|
+
};
|
|
4362
|
+
return Subscriber2;
|
|
4363
|
+
}(Subscription);
|
|
4364
|
+
var _bind = Function.prototype.bind;
|
|
4365
|
+
function bind(fn11, thisArg) {
|
|
4366
|
+
return _bind.call(fn11, thisArg);
|
|
4367
|
+
}
|
|
4368
|
+
var ConsumerObserver = function() {
|
|
4369
|
+
function ConsumerObserver2(partialObserver) {
|
|
4370
|
+
this.partialObserver = partialObserver;
|
|
4371
|
+
}
|
|
4372
|
+
ConsumerObserver2.prototype.next = function(value) {
|
|
4373
|
+
var partialObserver = this.partialObserver;
|
|
4374
|
+
if (partialObserver.next) {
|
|
4375
|
+
try {
|
|
4376
|
+
partialObserver.next(value);
|
|
4377
|
+
} catch (error) {
|
|
4378
|
+
handleUnhandledError(error);
|
|
4379
|
+
}
|
|
4380
|
+
}
|
|
4381
|
+
};
|
|
4382
|
+
ConsumerObserver2.prototype.error = function(err) {
|
|
4383
|
+
var partialObserver = this.partialObserver;
|
|
4384
|
+
if (partialObserver.error) {
|
|
4385
|
+
try {
|
|
4386
|
+
partialObserver.error(err);
|
|
4387
|
+
} catch (error) {
|
|
4388
|
+
handleUnhandledError(error);
|
|
4389
|
+
}
|
|
4390
|
+
} else {
|
|
4391
|
+
handleUnhandledError(err);
|
|
4392
|
+
}
|
|
4393
|
+
};
|
|
4394
|
+
ConsumerObserver2.prototype.complete = function() {
|
|
4395
|
+
var partialObserver = this.partialObserver;
|
|
4396
|
+
if (partialObserver.complete) {
|
|
4397
|
+
try {
|
|
4398
|
+
partialObserver.complete();
|
|
4399
|
+
} catch (error) {
|
|
4400
|
+
handleUnhandledError(error);
|
|
4401
|
+
}
|
|
4402
|
+
}
|
|
4403
|
+
};
|
|
4404
|
+
return ConsumerObserver2;
|
|
4405
|
+
}();
|
|
4406
|
+
var SafeSubscriber = function(_super) {
|
|
4407
|
+
__extends(SafeSubscriber2, _super);
|
|
4408
|
+
function SafeSubscriber2(observerOrNext, error, complete) {
|
|
4409
|
+
var _this = _super.call(this) || this;
|
|
4410
|
+
var partialObserver;
|
|
4411
|
+
if (isFunction(observerOrNext) || !observerOrNext) {
|
|
4412
|
+
partialObserver = {
|
|
4413
|
+
next: observerOrNext !== null && observerOrNext !== void 0 ? observerOrNext : void 0,
|
|
4414
|
+
error: error !== null && error !== void 0 ? error : void 0,
|
|
4415
|
+
complete: complete !== null && complete !== void 0 ? complete : void 0
|
|
4416
|
+
};
|
|
4417
|
+
} else {
|
|
4418
|
+
var context_1;
|
|
4419
|
+
if (_this && config2.useDeprecatedNextContext) {
|
|
4420
|
+
context_1 = Object.create(observerOrNext);
|
|
4421
|
+
context_1.unsubscribe = function() {
|
|
4422
|
+
return _this.unsubscribe();
|
|
4423
|
+
};
|
|
4424
|
+
partialObserver = {
|
|
4425
|
+
next: observerOrNext.next && bind(observerOrNext.next, context_1),
|
|
4426
|
+
error: observerOrNext.error && bind(observerOrNext.error, context_1),
|
|
4427
|
+
complete: observerOrNext.complete && bind(observerOrNext.complete, context_1)
|
|
4428
|
+
};
|
|
4429
|
+
} else {
|
|
4430
|
+
partialObserver = observerOrNext;
|
|
4431
|
+
}
|
|
4432
|
+
}
|
|
4433
|
+
_this.destination = new ConsumerObserver(partialObserver);
|
|
4434
|
+
return _this;
|
|
4435
|
+
}
|
|
4436
|
+
return SafeSubscriber2;
|
|
4437
|
+
}(Subscriber);
|
|
4438
|
+
function handleUnhandledError(error) {
|
|
4439
|
+
if (config2.useDeprecatedSynchronousErrorHandling) {
|
|
4440
|
+
captureError(error);
|
|
4441
|
+
} else {
|
|
4442
|
+
reportUnhandledError(error);
|
|
4443
|
+
}
|
|
4444
|
+
}
|
|
4445
|
+
function defaultErrorHandler(err) {
|
|
4446
|
+
throw err;
|
|
4447
|
+
}
|
|
4448
|
+
function handleStoppedNotification(notification, subscriber) {
|
|
4449
|
+
var onStoppedNotification = config2.onStoppedNotification;
|
|
4450
|
+
onStoppedNotification && timeoutProvider.setTimeout(function() {
|
|
4451
|
+
return onStoppedNotification(notification, subscriber);
|
|
4452
|
+
});
|
|
4453
|
+
}
|
|
4454
|
+
var EMPTY_OBSERVER = {
|
|
4455
|
+
closed: true,
|
|
4456
|
+
next: noop,
|
|
4457
|
+
error: defaultErrorHandler,
|
|
4458
|
+
complete: noop
|
|
4459
|
+
};
|
|
4460
|
+
|
|
4461
|
+
// node_modules/rxjs/dist/esm5/internal/symbol/observable.js
|
|
4462
|
+
var observable = function() {
|
|
4463
|
+
return typeof Symbol === "function" && Symbol.observable || "@@observable";
|
|
4464
|
+
}();
|
|
4465
|
+
|
|
4466
|
+
// node_modules/rxjs/dist/esm5/internal/util/identity.js
|
|
4467
|
+
function identity(x2) {
|
|
4468
|
+
return x2;
|
|
4469
|
+
}
|
|
4470
|
+
|
|
4471
|
+
// node_modules/rxjs/dist/esm5/internal/util/pipe.js
|
|
4472
|
+
function pipeFromArray(fns) {
|
|
4473
|
+
if (fns.length === 0) {
|
|
4474
|
+
return identity;
|
|
4475
|
+
}
|
|
4476
|
+
if (fns.length === 1) {
|
|
4477
|
+
return fns[0];
|
|
4478
|
+
}
|
|
4479
|
+
return function piped(input2) {
|
|
4480
|
+
return fns.reduce(function(prev, fn11) {
|
|
4481
|
+
return fn11(prev);
|
|
4482
|
+
}, input2);
|
|
4483
|
+
};
|
|
4484
|
+
}
|
|
4485
|
+
|
|
4486
|
+
// node_modules/rxjs/dist/esm5/internal/Observable.js
|
|
4487
|
+
var Observable = function() {
|
|
4488
|
+
function Observable3(subscribe3) {
|
|
4489
|
+
if (subscribe3) {
|
|
4490
|
+
this._subscribe = subscribe3;
|
|
4491
|
+
}
|
|
4492
|
+
}
|
|
4493
|
+
Observable3.prototype.lift = function(operator) {
|
|
4494
|
+
var observable2 = new Observable3();
|
|
4495
|
+
observable2.source = this;
|
|
4496
|
+
observable2.operator = operator;
|
|
4497
|
+
return observable2;
|
|
4498
|
+
};
|
|
4499
|
+
Observable3.prototype.subscribe = function(observerOrNext, error, complete) {
|
|
4500
|
+
var _this = this;
|
|
4501
|
+
var subscriber = isSubscriber(observerOrNext) ? observerOrNext : new SafeSubscriber(observerOrNext, error, complete);
|
|
4502
|
+
errorContext(function() {
|
|
4503
|
+
var _a2 = _this, operator = _a2.operator, source = _a2.source;
|
|
4504
|
+
subscriber.add(operator ? operator.call(subscriber, source) : source ? _this._subscribe(subscriber) : _this._trySubscribe(subscriber));
|
|
4505
|
+
});
|
|
4506
|
+
return subscriber;
|
|
4507
|
+
};
|
|
4508
|
+
Observable3.prototype._trySubscribe = function(sink) {
|
|
4509
|
+
try {
|
|
4510
|
+
return this._subscribe(sink);
|
|
4511
|
+
} catch (err) {
|
|
4512
|
+
sink.error(err);
|
|
4513
|
+
}
|
|
4514
|
+
};
|
|
4515
|
+
Observable3.prototype.forEach = function(next, promiseCtor) {
|
|
4516
|
+
var _this = this;
|
|
4517
|
+
promiseCtor = getPromiseCtor(promiseCtor);
|
|
4518
|
+
return new promiseCtor(function(resolve, reject) {
|
|
4519
|
+
var subscriber = new SafeSubscriber({
|
|
4520
|
+
next: function(value) {
|
|
4521
|
+
try {
|
|
4522
|
+
next(value);
|
|
4523
|
+
} catch (err) {
|
|
4524
|
+
reject(err);
|
|
4525
|
+
subscriber.unsubscribe();
|
|
4526
|
+
}
|
|
4527
|
+
},
|
|
4528
|
+
error: reject,
|
|
4529
|
+
complete: resolve
|
|
4530
|
+
});
|
|
4531
|
+
_this.subscribe(subscriber);
|
|
4532
|
+
});
|
|
4533
|
+
};
|
|
4534
|
+
Observable3.prototype._subscribe = function(subscriber) {
|
|
4535
|
+
var _a2;
|
|
4536
|
+
return (_a2 = this.source) === null || _a2 === void 0 ? void 0 : _a2.subscribe(subscriber);
|
|
4537
|
+
};
|
|
4538
|
+
Observable3.prototype[observable] = function() {
|
|
4539
|
+
return this;
|
|
4540
|
+
};
|
|
4541
|
+
Observable3.prototype.pipe = function() {
|
|
4542
|
+
var operations = [];
|
|
4543
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
4544
|
+
operations[_i] = arguments[_i];
|
|
4545
|
+
}
|
|
4546
|
+
return pipeFromArray(operations)(this);
|
|
4547
|
+
};
|
|
4548
|
+
Observable3.prototype.toPromise = function(promiseCtor) {
|
|
4549
|
+
var _this = this;
|
|
4550
|
+
promiseCtor = getPromiseCtor(promiseCtor);
|
|
4551
|
+
return new promiseCtor(function(resolve, reject) {
|
|
4552
|
+
var value;
|
|
4553
|
+
_this.subscribe(function(x2) {
|
|
4554
|
+
return value = x2;
|
|
4555
|
+
}, function(err) {
|
|
4556
|
+
return reject(err);
|
|
4557
|
+
}, function() {
|
|
4558
|
+
return resolve(value);
|
|
4559
|
+
});
|
|
4560
|
+
});
|
|
4561
|
+
};
|
|
4562
|
+
Observable3.create = function(subscribe3) {
|
|
4563
|
+
return new Observable3(subscribe3);
|
|
4564
|
+
};
|
|
4565
|
+
return Observable3;
|
|
4566
|
+
}();
|
|
4567
|
+
function getPromiseCtor(promiseCtor) {
|
|
4568
|
+
var _a2;
|
|
4569
|
+
return (_a2 = promiseCtor !== null && promiseCtor !== void 0 ? promiseCtor : config2.Promise) !== null && _a2 !== void 0 ? _a2 : Promise;
|
|
4570
|
+
}
|
|
4571
|
+
function isObserver(value) {
|
|
4572
|
+
return value && isFunction(value.next) && isFunction(value.error) && isFunction(value.complete);
|
|
4573
|
+
}
|
|
4574
|
+
function isSubscriber(value) {
|
|
4575
|
+
return value && value instanceof Subscriber || isObserver(value) && isSubscription(value);
|
|
4576
|
+
}
|
|
4577
|
+
|
|
4578
|
+
// node_modules/rxjs/dist/esm5/internal/util/lift.js
|
|
4579
|
+
function hasLift(source) {
|
|
4580
|
+
return isFunction(source === null || source === void 0 ? void 0 : source.lift);
|
|
4581
|
+
}
|
|
4582
|
+
function operate(init) {
|
|
4583
|
+
return function(source) {
|
|
4584
|
+
if (hasLift(source)) {
|
|
4585
|
+
return source.lift(function(liftedSource) {
|
|
4586
|
+
try {
|
|
4587
|
+
return init(liftedSource, this);
|
|
4588
|
+
} catch (err) {
|
|
4589
|
+
this.error(err);
|
|
4590
|
+
}
|
|
4591
|
+
});
|
|
4592
|
+
}
|
|
4593
|
+
throw new TypeError("Unable to lift unknown Observable type");
|
|
4594
|
+
};
|
|
4595
|
+
}
|
|
4596
|
+
|
|
4597
|
+
// node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js
|
|
4598
|
+
import { __extends as __extends2 } from "tslib";
|
|
4599
|
+
function createOperatorSubscriber(destination, onNext, onComplete, onError, onFinalize) {
|
|
4600
|
+
return new OperatorSubscriber(destination, onNext, onComplete, onError, onFinalize);
|
|
4601
|
+
}
|
|
4602
|
+
var OperatorSubscriber = function(_super) {
|
|
4603
|
+
__extends2(OperatorSubscriber2, _super);
|
|
4604
|
+
function OperatorSubscriber2(destination, onNext, onComplete, onError, onFinalize, shouldUnsubscribe) {
|
|
4605
|
+
var _this = _super.call(this, destination) || this;
|
|
4606
|
+
_this.onFinalize = onFinalize;
|
|
4607
|
+
_this.shouldUnsubscribe = shouldUnsubscribe;
|
|
4608
|
+
_this._next = onNext ? function(value) {
|
|
4609
|
+
try {
|
|
4610
|
+
onNext(value);
|
|
4611
|
+
} catch (err) {
|
|
4612
|
+
destination.error(err);
|
|
4613
|
+
}
|
|
4614
|
+
} : _super.prototype._next;
|
|
4615
|
+
_this._error = onError ? function(err) {
|
|
4616
|
+
try {
|
|
4617
|
+
onError(err);
|
|
4618
|
+
} catch (err2) {
|
|
4619
|
+
destination.error(err2);
|
|
4620
|
+
} finally {
|
|
4621
|
+
this.unsubscribe();
|
|
4622
|
+
}
|
|
4623
|
+
} : _super.prototype._error;
|
|
4624
|
+
_this._complete = onComplete ? function() {
|
|
4625
|
+
try {
|
|
4626
|
+
onComplete();
|
|
4627
|
+
} catch (err) {
|
|
4628
|
+
destination.error(err);
|
|
4629
|
+
} finally {
|
|
4630
|
+
this.unsubscribe();
|
|
4631
|
+
}
|
|
4632
|
+
} : _super.prototype._complete;
|
|
4633
|
+
return _this;
|
|
4634
|
+
}
|
|
4635
|
+
OperatorSubscriber2.prototype.unsubscribe = function() {
|
|
4636
|
+
var _a2;
|
|
4637
|
+
if (!this.shouldUnsubscribe || this.shouldUnsubscribe()) {
|
|
4638
|
+
var closed_1 = this.closed;
|
|
4639
|
+
_super.prototype.unsubscribe.call(this);
|
|
4640
|
+
!closed_1 && ((_a2 = this.onFinalize) === null || _a2 === void 0 ? void 0 : _a2.call(this));
|
|
4641
|
+
}
|
|
4642
|
+
};
|
|
4643
|
+
return OperatorSubscriber2;
|
|
4644
|
+
}(Subscriber);
|
|
4645
|
+
|
|
4646
|
+
// node_modules/rxjs/dist/esm5/internal/Subject.js
|
|
4647
|
+
import { __extends as __extends3, __values as __values2 } from "tslib";
|
|
4648
|
+
|
|
4649
|
+
// node_modules/rxjs/dist/esm5/internal/util/ObjectUnsubscribedError.js
|
|
4650
|
+
var ObjectUnsubscribedError = createErrorClass(function(_super) {
|
|
4651
|
+
return function ObjectUnsubscribedErrorImpl() {
|
|
4652
|
+
_super(this);
|
|
4653
|
+
this.name = "ObjectUnsubscribedError";
|
|
4654
|
+
this.message = "object unsubscribed";
|
|
4655
|
+
};
|
|
4656
|
+
});
|
|
4657
|
+
|
|
4658
|
+
// node_modules/rxjs/dist/esm5/internal/Subject.js
|
|
4659
|
+
var Subject = function(_super) {
|
|
4660
|
+
__extends3(Subject2, _super);
|
|
4661
|
+
function Subject2() {
|
|
4662
|
+
var _this = _super.call(this) || this;
|
|
4663
|
+
_this.closed = false;
|
|
4664
|
+
_this.currentObservers = null;
|
|
4665
|
+
_this.observers = [];
|
|
4666
|
+
_this.isStopped = false;
|
|
4667
|
+
_this.hasError = false;
|
|
4668
|
+
_this.thrownError = null;
|
|
4669
|
+
return _this;
|
|
4670
|
+
}
|
|
4671
|
+
Subject2.prototype.lift = function(operator) {
|
|
4672
|
+
var subject = new AnonymousSubject(this, this);
|
|
4673
|
+
subject.operator = operator;
|
|
4674
|
+
return subject;
|
|
4675
|
+
};
|
|
4676
|
+
Subject2.prototype._throwIfClosed = function() {
|
|
4677
|
+
if (this.closed) {
|
|
4678
|
+
throw new ObjectUnsubscribedError();
|
|
4679
|
+
}
|
|
4680
|
+
};
|
|
4681
|
+
Subject2.prototype.next = function(value) {
|
|
4682
|
+
var _this = this;
|
|
4683
|
+
errorContext(function() {
|
|
4684
|
+
var e_1, _a2;
|
|
4685
|
+
_this._throwIfClosed();
|
|
4686
|
+
if (!_this.isStopped) {
|
|
4687
|
+
if (!_this.currentObservers) {
|
|
4688
|
+
_this.currentObservers = Array.from(_this.observers);
|
|
4689
|
+
}
|
|
4690
|
+
try {
|
|
4691
|
+
for (var _b = __values2(_this.currentObservers), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
4692
|
+
var observer = _c.value;
|
|
4693
|
+
observer.next(value);
|
|
4694
|
+
}
|
|
4695
|
+
} catch (e_1_1) {
|
|
4696
|
+
e_1 = { error: e_1_1 };
|
|
4697
|
+
} finally {
|
|
4698
|
+
try {
|
|
4699
|
+
if (_c && !_c.done && (_a2 = _b.return))
|
|
4700
|
+
_a2.call(_b);
|
|
4701
|
+
} finally {
|
|
4702
|
+
if (e_1)
|
|
4703
|
+
throw e_1.error;
|
|
4704
|
+
}
|
|
4705
|
+
}
|
|
4706
|
+
}
|
|
4707
|
+
});
|
|
4708
|
+
};
|
|
4709
|
+
Subject2.prototype.error = function(err) {
|
|
4710
|
+
var _this = this;
|
|
4711
|
+
errorContext(function() {
|
|
4712
|
+
_this._throwIfClosed();
|
|
4713
|
+
if (!_this.isStopped) {
|
|
4714
|
+
_this.hasError = _this.isStopped = true;
|
|
4715
|
+
_this.thrownError = err;
|
|
4716
|
+
var observers = _this.observers;
|
|
4717
|
+
while (observers.length) {
|
|
4718
|
+
observers.shift().error(err);
|
|
4719
|
+
}
|
|
4720
|
+
}
|
|
4721
|
+
});
|
|
4722
|
+
};
|
|
4723
|
+
Subject2.prototype.complete = function() {
|
|
4724
|
+
var _this = this;
|
|
4725
|
+
errorContext(function() {
|
|
4726
|
+
_this._throwIfClosed();
|
|
4727
|
+
if (!_this.isStopped) {
|
|
4728
|
+
_this.isStopped = true;
|
|
4729
|
+
var observers = _this.observers;
|
|
4730
|
+
while (observers.length) {
|
|
4731
|
+
observers.shift().complete();
|
|
4732
|
+
}
|
|
4733
|
+
}
|
|
4734
|
+
});
|
|
4735
|
+
};
|
|
4736
|
+
Subject2.prototype.unsubscribe = function() {
|
|
4737
|
+
this.isStopped = this.closed = true;
|
|
4738
|
+
this.observers = this.currentObservers = null;
|
|
4739
|
+
};
|
|
4740
|
+
Object.defineProperty(Subject2.prototype, "observed", {
|
|
4741
|
+
get: function() {
|
|
4742
|
+
var _a2;
|
|
4743
|
+
return ((_a2 = this.observers) === null || _a2 === void 0 ? void 0 : _a2.length) > 0;
|
|
4744
|
+
},
|
|
4745
|
+
enumerable: false,
|
|
4746
|
+
configurable: true
|
|
4747
|
+
});
|
|
4748
|
+
Subject2.prototype._trySubscribe = function(subscriber) {
|
|
4749
|
+
this._throwIfClosed();
|
|
4750
|
+
return _super.prototype._trySubscribe.call(this, subscriber);
|
|
4751
|
+
};
|
|
4752
|
+
Subject2.prototype._subscribe = function(subscriber) {
|
|
4753
|
+
this._throwIfClosed();
|
|
4754
|
+
this._checkFinalizedStatuses(subscriber);
|
|
4755
|
+
return this._innerSubscribe(subscriber);
|
|
4756
|
+
};
|
|
4757
|
+
Subject2.prototype._innerSubscribe = function(subscriber) {
|
|
4758
|
+
var _this = this;
|
|
4759
|
+
var _a2 = this, hasError = _a2.hasError, isStopped = _a2.isStopped, observers = _a2.observers;
|
|
4760
|
+
if (hasError || isStopped) {
|
|
4761
|
+
return EMPTY_SUBSCRIPTION;
|
|
4762
|
+
}
|
|
4763
|
+
this.currentObservers = null;
|
|
4764
|
+
observers.push(subscriber);
|
|
4765
|
+
return new Subscription(function() {
|
|
4766
|
+
_this.currentObservers = null;
|
|
4767
|
+
arrRemove(observers, subscriber);
|
|
4768
|
+
});
|
|
4769
|
+
};
|
|
4770
|
+
Subject2.prototype._checkFinalizedStatuses = function(subscriber) {
|
|
4771
|
+
var _a2 = this, hasError = _a2.hasError, thrownError = _a2.thrownError, isStopped = _a2.isStopped;
|
|
4772
|
+
if (hasError) {
|
|
4773
|
+
subscriber.error(thrownError);
|
|
4774
|
+
} else if (isStopped) {
|
|
4775
|
+
subscriber.complete();
|
|
4776
|
+
}
|
|
4777
|
+
};
|
|
4778
|
+
Subject2.prototype.asObservable = function() {
|
|
4779
|
+
var observable2 = new Observable();
|
|
4780
|
+
observable2.source = this;
|
|
4781
|
+
return observable2;
|
|
4782
|
+
};
|
|
4783
|
+
Subject2.create = function(destination, source) {
|
|
4784
|
+
return new AnonymousSubject(destination, source);
|
|
4785
|
+
};
|
|
4786
|
+
return Subject2;
|
|
4787
|
+
}(Observable);
|
|
4788
|
+
var AnonymousSubject = function(_super) {
|
|
4789
|
+
__extends3(AnonymousSubject2, _super);
|
|
4790
|
+
function AnonymousSubject2(destination, source) {
|
|
4791
|
+
var _this = _super.call(this) || this;
|
|
4792
|
+
_this.destination = destination;
|
|
4793
|
+
_this.source = source;
|
|
4794
|
+
return _this;
|
|
4795
|
+
}
|
|
4796
|
+
AnonymousSubject2.prototype.next = function(value) {
|
|
4797
|
+
var _a2, _b;
|
|
4798
|
+
(_b = (_a2 = this.destination) === null || _a2 === void 0 ? void 0 : _a2.next) === null || _b === void 0 ? void 0 : _b.call(_a2, value);
|
|
4799
|
+
};
|
|
4800
|
+
AnonymousSubject2.prototype.error = function(err) {
|
|
4801
|
+
var _a2, _b;
|
|
4802
|
+
(_b = (_a2 = this.destination) === null || _a2 === void 0 ? void 0 : _a2.error) === null || _b === void 0 ? void 0 : _b.call(_a2, err);
|
|
4803
|
+
};
|
|
4804
|
+
AnonymousSubject2.prototype.complete = function() {
|
|
4805
|
+
var _a2, _b;
|
|
4806
|
+
(_b = (_a2 = this.destination) === null || _a2 === void 0 ? void 0 : _a2.complete) === null || _b === void 0 ? void 0 : _b.call(_a2);
|
|
4807
|
+
};
|
|
4808
|
+
AnonymousSubject2.prototype._subscribe = function(subscriber) {
|
|
4809
|
+
var _a2, _b;
|
|
4810
|
+
return (_b = (_a2 = this.source) === null || _a2 === void 0 ? void 0 : _a2.subscribe(subscriber)) !== null && _b !== void 0 ? _b : EMPTY_SUBSCRIPTION;
|
|
4811
|
+
};
|
|
4812
|
+
return AnonymousSubject2;
|
|
4813
|
+
}(Subject);
|
|
4814
|
+
|
|
4815
|
+
// node_modules/rxjs/dist/esm5/internal/BehaviorSubject.js
|
|
4816
|
+
import { __extends as __extends4 } from "tslib";
|
|
4817
|
+
var BehaviorSubject = function(_super) {
|
|
4818
|
+
__extends4(BehaviorSubject2, _super);
|
|
4819
|
+
function BehaviorSubject2(_value) {
|
|
4820
|
+
var _this = _super.call(this) || this;
|
|
4821
|
+
_this._value = _value;
|
|
4822
|
+
return _this;
|
|
4823
|
+
}
|
|
4824
|
+
Object.defineProperty(BehaviorSubject2.prototype, "value", {
|
|
4825
|
+
get: function() {
|
|
4826
|
+
return this.getValue();
|
|
4827
|
+
},
|
|
4828
|
+
enumerable: false,
|
|
4829
|
+
configurable: true
|
|
4830
|
+
});
|
|
4831
|
+
BehaviorSubject2.prototype._subscribe = function(subscriber) {
|
|
4832
|
+
var subscription = _super.prototype._subscribe.call(this, subscriber);
|
|
4833
|
+
!subscription.closed && subscriber.next(this._value);
|
|
4834
|
+
return subscription;
|
|
4835
|
+
};
|
|
4836
|
+
BehaviorSubject2.prototype.getValue = function() {
|
|
4837
|
+
var _a2 = this, hasError = _a2.hasError, thrownError = _a2.thrownError, _value = _a2._value;
|
|
4838
|
+
if (hasError) {
|
|
4839
|
+
throw thrownError;
|
|
4840
|
+
}
|
|
4841
|
+
this._throwIfClosed();
|
|
4842
|
+
return _value;
|
|
4843
|
+
};
|
|
4844
|
+
BehaviorSubject2.prototype.next = function(value) {
|
|
4845
|
+
_super.prototype.next.call(this, this._value = value);
|
|
4846
|
+
};
|
|
4847
|
+
return BehaviorSubject2;
|
|
4848
|
+
}(Subject);
|
|
4849
|
+
|
|
4850
|
+
// node_modules/rxjs/dist/esm5/internal/operators/map.js
|
|
4851
|
+
function map(project, thisArg) {
|
|
4852
|
+
return operate(function(source, subscriber) {
|
|
4853
|
+
var index = 0;
|
|
4854
|
+
source.subscribe(createOperatorSubscriber(subscriber, function(value) {
|
|
4855
|
+
subscriber.next(project.call(thisArg, value, index++));
|
|
4856
|
+
}));
|
|
4857
|
+
});
|
|
4858
|
+
}
|
|
4859
|
+
|
|
4860
|
+
// src/hooks/use-rich-errors.ts
|
|
4025
4861
|
var $richError = new BehaviorSubject(null);
|
|
4026
4862
|
var attachRichErrorsInterceptor = (apiClient, i18n3) => apiClient.interceptors.response.use(void 0, (error) => {
|
|
4027
4863
|
if (i18n3.exists(`errors.${error?.response?.data?.message}`) && !error?.config?.url.includes("gas-estimate")) {
|
|
@@ -9635,7 +10471,7 @@ function useConnectModal() {
|
|
|
9635
10471
|
closeConnectModal
|
|
9636
10472
|
};
|
|
9637
10473
|
}
|
|
9638
|
-
var
|
|
10474
|
+
var noop2 = () => {
|
|
9639
10475
|
};
|
|
9640
10476
|
function ConnectButtonRenderer({
|
|
9641
10477
|
children
|
|
@@ -9701,9 +10537,9 @@ function ConnectButtonRenderer({
|
|
|
9701
10537
|
chainModalOpen,
|
|
9702
10538
|
connectModalOpen,
|
|
9703
10539
|
mounted: isMounted(),
|
|
9704
|
-
openAccountModal: openAccountModal != null ? openAccountModal :
|
|
9705
|
-
openChainModal: openChainModal != null ? openChainModal :
|
|
9706
|
-
openConnectModal: openConnectModal != null ? openConnectModal :
|
|
10540
|
+
openAccountModal: openAccountModal != null ? openAccountModal : noop2,
|
|
10541
|
+
openChainModal: openChainModal != null ? openChainModal : noop2,
|
|
10542
|
+
openConnectModal: openConnectModal != null ? openConnectModal : noop2
|
|
9707
10543
|
}));
|
|
9708
10544
|
}
|
|
9709
10545
|
ConnectButtonRenderer.displayName = "ConnectButton.Custom";
|
|
@@ -10848,8 +11684,8 @@ function createInjectedConnector(provider) {
|
|
|
10848
11684
|
provider
|
|
10849
11685
|
})
|
|
10850
11686
|
} : {};
|
|
10851
|
-
return createConnector4((
|
|
10852
|
-
...injected2(injectedConfig)(
|
|
11687
|
+
return createConnector4((config3) => ({
|
|
11688
|
+
...injected2(injectedConfig)(config3),
|
|
10853
11689
|
...walletDetails
|
|
10854
11690
|
}));
|
|
10855
11691
|
};
|
|
@@ -10872,20 +11708,20 @@ var getOrCreateWalletConnectInstance = ({
|
|
|
10872
11708
|
walletConnectParameters,
|
|
10873
11709
|
rkDetailsShowQrModal
|
|
10874
11710
|
}) => {
|
|
10875
|
-
let
|
|
11711
|
+
let config3 = {
|
|
10876
11712
|
...walletConnectParameters ? walletConnectParameters : {},
|
|
10877
11713
|
projectId,
|
|
10878
11714
|
showQrModal: false
|
|
10879
11715
|
};
|
|
10880
11716
|
if (rkDetailsShowQrModal) {
|
|
10881
|
-
|
|
11717
|
+
config3 = { ...config3, showQrModal: true };
|
|
10882
11718
|
}
|
|
10883
|
-
const serializedConfig = JSON.stringify(
|
|
11719
|
+
const serializedConfig = JSON.stringify(config3);
|
|
10884
11720
|
const sharedWalletConnector = walletConnectInstances.get(serializedConfig);
|
|
10885
11721
|
if (sharedWalletConnector) {
|
|
10886
11722
|
return sharedWalletConnector;
|
|
10887
11723
|
}
|
|
10888
|
-
const newWalletConnectInstance = walletConnect2(
|
|
11724
|
+
const newWalletConnectInstance = walletConnect2(config3);
|
|
10889
11725
|
walletConnectInstances.set(serializedConfig, newWalletConnectInstance);
|
|
10890
11726
|
return newWalletConnectInstance;
|
|
10891
11727
|
};
|
|
@@ -10894,12 +11730,12 @@ function createWalletConnectConnector({
|
|
|
10894
11730
|
walletDetails,
|
|
10895
11731
|
walletConnectParameters
|
|
10896
11732
|
}) {
|
|
10897
|
-
return createConnector5((
|
|
11733
|
+
return createConnector5((config3) => ({
|
|
10898
11734
|
...getOrCreateWalletConnectInstance({
|
|
10899
11735
|
projectId,
|
|
10900
11736
|
walletConnectParameters,
|
|
10901
11737
|
rkDetailsShowQrModal: walletDetails.rkDetails.showQrModal
|
|
10902
|
-
})(
|
|
11738
|
+
})(config3),
|
|
10903
11739
|
...walletDetails
|
|
10904
11740
|
}));
|
|
10905
11741
|
}
|
|
@@ -11257,12 +12093,12 @@ var coinbaseWallet = ({
|
|
|
11257
12093
|
}
|
|
11258
12094
|
}
|
|
11259
12095
|
},
|
|
11260
|
-
createConnector: (walletDetails) => createConnector6((
|
|
12096
|
+
createConnector: (walletDetails) => createConnector6((config3) => ({
|
|
11261
12097
|
...coinbaseWagmiWallet2({
|
|
11262
12098
|
appName,
|
|
11263
12099
|
appLogoUrl: appIcon,
|
|
11264
12100
|
headlessMode: true
|
|
11265
|
-
})(
|
|
12101
|
+
})(config3),
|
|
11266
12102
|
...walletDetails
|
|
11267
12103
|
}))
|
|
11268
12104
|
};
|
|
@@ -42968,7 +43804,6 @@ var notify3 = (key) => {
|
|
|
42968
43804
|
|
|
42969
43805
|
// src/providers/cosmos/cosmos-connector.ts
|
|
42970
43806
|
import EventEmitter from "eventemitter3";
|
|
42971
|
-
import { BehaviorSubject as BehaviorSubject2 } from "rxjs";
|
|
42972
43807
|
var wallets = [
|
|
42973
43808
|
...keplrWallets,
|
|
42974
43809
|
...leapWallets,
|
|
@@ -43008,9 +43843,9 @@ var createCosmosConnector = ({
|
|
|
43008
43843
|
qrCode: {
|
|
43009
43844
|
getUri: (uri) => uri
|
|
43010
43845
|
},
|
|
43011
|
-
createConnector: (walletDetailsParams) => createConnector7((
|
|
43846
|
+
createConnector: (walletDetailsParams) => createConnector7((config3) => {
|
|
43012
43847
|
const provider = new EventEmitter();
|
|
43013
|
-
const $filteredChains = new
|
|
43848
|
+
const $filteredChains = new BehaviorSubject(cosmosWagmiChains);
|
|
43014
43849
|
let chainWallet = new Promise((res, rej) => {
|
|
43015
43850
|
let retryTimes = 0;
|
|
43016
43851
|
const check = async () => {
|
|
@@ -43033,7 +43868,7 @@ var createCosmosConnector = ({
|
|
|
43033
43868
|
check();
|
|
43034
43869
|
});
|
|
43035
43870
|
const connect = async () => {
|
|
43036
|
-
|
|
43871
|
+
config3.emitter.emit("message", { type: "connecting" });
|
|
43037
43872
|
const cw = await chainWallet;
|
|
43038
43873
|
if (cw.address && cw.chainId) {
|
|
43039
43874
|
if (cw.walletInfo.mode === "wallet-connect") {
|
|
@@ -43076,7 +43911,7 @@ var createCosmosConnector = ({
|
|
|
43076
43911
|
});
|
|
43077
43912
|
};
|
|
43078
43913
|
const switchChain = async ({ chainId }) => {
|
|
43079
|
-
const wagmiChain =
|
|
43914
|
+
const wagmiChain = config3.chains.find((c) => c.id === chainId);
|
|
43080
43915
|
if (!wagmiChain)
|
|
43081
43916
|
throw new Error("Chain not found");
|
|
43082
43917
|
const cosmosChain = wagmiChain;
|
|
@@ -43087,7 +43922,7 @@ var createCosmosConnector = ({
|
|
|
43087
43922
|
throw new Error("Wallet not found");
|
|
43088
43923
|
chainWallet = Promise.resolve(newCw);
|
|
43089
43924
|
await connect();
|
|
43090
|
-
const chain =
|
|
43925
|
+
const chain = config3.chains.find((c) => c.id === chainId);
|
|
43091
43926
|
if (!chain)
|
|
43092
43927
|
throw new Error("Chain not found");
|
|
43093
43928
|
onChainChanged(chainId.toString());
|
|
@@ -43096,20 +43931,20 @@ var createCosmosConnector = ({
|
|
|
43096
43931
|
};
|
|
43097
43932
|
const onAccountsChanged = (accounts) => {
|
|
43098
43933
|
if (accounts.length === 0) {
|
|
43099
|
-
|
|
43934
|
+
config3.emitter.emit("disconnect");
|
|
43100
43935
|
} else {
|
|
43101
|
-
|
|
43936
|
+
config3.emitter.emit("change", {
|
|
43102
43937
|
accounts
|
|
43103
43938
|
});
|
|
43104
43939
|
}
|
|
43105
43940
|
};
|
|
43106
43941
|
const onChainChanged = (chainId) => {
|
|
43107
|
-
|
|
43942
|
+
config3.emitter.emit("change", {
|
|
43108
43943
|
chainId
|
|
43109
43944
|
});
|
|
43110
43945
|
};
|
|
43111
43946
|
const onDisconnect = () => {
|
|
43112
|
-
|
|
43947
|
+
config3.emitter.emit("disconnect");
|
|
43113
43948
|
};
|
|
43114
43949
|
const getAccounts = async () => {
|
|
43115
43950
|
return [(await chainWallet).address];
|
|
@@ -43557,7 +44392,7 @@ function getNetworkInfoByTronWeb(tronWeb) {
|
|
|
43557
44392
|
var TronLinkAdapterName = "TronLink";
|
|
43558
44393
|
var TronLinkAdapter = class extends Adapter {
|
|
43559
44394
|
// record if first connect event has emitted or not
|
|
43560
|
-
constructor(
|
|
44395
|
+
constructor(config3 = {}) {
|
|
43561
44396
|
super();
|
|
43562
44397
|
this.name = TronLinkAdapterName;
|
|
43563
44398
|
this.url = "https://www.tronlink.org/";
|
|
@@ -43673,7 +44508,7 @@ var TronLinkAdapter = class extends Adapter {
|
|
|
43673
44508
|
this.setState(state);
|
|
43674
44509
|
};
|
|
43675
44510
|
this.checkReadyInterval = null;
|
|
43676
|
-
const { checkTimeout = 30 * 1e3, dappIcon = "", dappName = "", openUrlWhenWalletNotFound = true, openTronLinkAppOnMobile = true } =
|
|
44511
|
+
const { checkTimeout = 30 * 1e3, dappIcon = "", dappName = "", openUrlWhenWalletNotFound = true, openTronLinkAppOnMobile = true } = config3;
|
|
43677
44512
|
if (typeof checkTimeout !== "number") {
|
|
43678
44513
|
throw new Error("[TronLinkAdapter] config.checkTimeout should be a number");
|
|
43679
44514
|
}
|
|
@@ -44072,10 +44907,10 @@ var getConnectParams = (chainId, pairingTopic) => ({
|
|
|
44072
44907
|
pairingTopic
|
|
44073
44908
|
});
|
|
44074
44909
|
var WalletConnectWallet2 = class {
|
|
44075
|
-
constructor(
|
|
44076
|
-
this._options =
|
|
44077
|
-
this._network =
|
|
44078
|
-
this._web3ModalConfig =
|
|
44910
|
+
constructor(config3) {
|
|
44911
|
+
this._options = config3.options;
|
|
44912
|
+
this._network = config3.network;
|
|
44913
|
+
this._web3ModalConfig = config3.web3ModalConfig || {};
|
|
44079
44914
|
this.web3Modal = new Web3Modal({
|
|
44080
44915
|
...this._web3ModalConfig,
|
|
44081
44916
|
projectId: this._options.projectId,
|
|
@@ -44225,7 +45060,7 @@ var __awaiter3 = function(thisArg, _arguments, P2, generator) {
|
|
|
44225
45060
|
var WalletConnectWalletName = "WalletConnect";
|
|
44226
45061
|
var NETWORK = Object.keys(ChainNetwork);
|
|
44227
45062
|
var WalletConnectAdapter = class extends Adapter {
|
|
44228
|
-
constructor(
|
|
45063
|
+
constructor(config3) {
|
|
44229
45064
|
super();
|
|
44230
45065
|
this.name = WalletConnectWalletName;
|
|
44231
45066
|
this.url = "https://walletconnect.org";
|
|
@@ -44243,21 +45078,21 @@ var WalletConnectAdapter = class extends Adapter {
|
|
|
44243
45078
|
this.emit("stateChanged", this._state);
|
|
44244
45079
|
}
|
|
44245
45080
|
};
|
|
44246
|
-
|
|
44247
|
-
if (!
|
|
45081
|
+
config3 = Object.assign({}, config3);
|
|
45082
|
+
if (!config3 || typeof config3 !== "object") {
|
|
44248
45083
|
throw new Error(`[WalletconnectAdapter] config is required.`);
|
|
44249
45084
|
}
|
|
44250
|
-
if (!NETWORK.includes(
|
|
45085
|
+
if (!NETWORK.includes(config3.network)) {
|
|
44251
45086
|
console.error(`[WalletconnectAdapter] config.network must be one of ${NETWORK.join()}. Use Nile network instead.`);
|
|
44252
|
-
|
|
45087
|
+
config3.network = "Nile";
|
|
44253
45088
|
}
|
|
44254
|
-
if (!
|
|
45089
|
+
if (!config3.options) {
|
|
44255
45090
|
throw new Error(`[WalletconnectAdapter] config.options is required.`);
|
|
44256
45091
|
}
|
|
44257
45092
|
this._connecting = false;
|
|
44258
45093
|
this._wallet = null;
|
|
44259
45094
|
this._address = null;
|
|
44260
|
-
this._config =
|
|
45095
|
+
this._config = config3;
|
|
44261
45096
|
}
|
|
44262
45097
|
get address() {
|
|
44263
45098
|
return this._address;
|
|
@@ -44819,7 +45654,7 @@ var __awaiter4 = function(thisArg, _arguments, P2, generator) {
|
|
|
44819
45654
|
};
|
|
44820
45655
|
var BitgetWalletAdapterName = m === null || m === void 0 ? void 0 : m.name;
|
|
44821
45656
|
var BitKeepAdapter = class extends Adapter {
|
|
44822
|
-
constructor(
|
|
45657
|
+
constructor(config3 = {}) {
|
|
44823
45658
|
var _a2;
|
|
44824
45659
|
super();
|
|
44825
45660
|
this.name = BitgetWalletAdapterName;
|
|
@@ -44849,7 +45684,7 @@ var BitKeepAdapter = class extends Adapter {
|
|
|
44849
45684
|
this.setAddress(address);
|
|
44850
45685
|
this.setState(state);
|
|
44851
45686
|
});
|
|
44852
|
-
const { checkTimeout = 2 * 1e3, openUrlWhenWalletNotFound = true, openAppWithDeeplink = true } =
|
|
45687
|
+
const { checkTimeout = 2 * 1e3, openUrlWhenWalletNotFound = true, openAppWithDeeplink = true } = config3;
|
|
44853
45688
|
if (typeof checkTimeout !== "number") {
|
|
44854
45689
|
throw new Error("[BitKeepAdapter] config.checkTimeout should be a number");
|
|
44855
45690
|
}
|
|
@@ -45426,7 +46261,7 @@ var log = (type, message, data) => {
|
|
|
45426
46261
|
obj.data = data;
|
|
45427
46262
|
dispatch(obj);
|
|
45428
46263
|
};
|
|
45429
|
-
var trace = ({ type, message, data, context }) => {
|
|
46264
|
+
var trace = ({ type, message, data, context: context2 }) => {
|
|
45430
46265
|
const obj = {
|
|
45431
46266
|
type,
|
|
45432
46267
|
id: String(++id2),
|
|
@@ -45436,14 +46271,14 @@ var trace = ({ type, message, data, context }) => {
|
|
|
45436
46271
|
obj.message = message;
|
|
45437
46272
|
if (data)
|
|
45438
46273
|
obj.data = data;
|
|
45439
|
-
if (
|
|
45440
|
-
obj.context =
|
|
46274
|
+
if (context2)
|
|
46275
|
+
obj.context = context2;
|
|
45441
46276
|
dispatch(obj);
|
|
45442
46277
|
};
|
|
45443
46278
|
var LocalTracer = class _LocalTracer {
|
|
45444
|
-
constructor(type,
|
|
46279
|
+
constructor(type, context2) {
|
|
45445
46280
|
this.type = type;
|
|
45446
|
-
this.context =
|
|
46281
|
+
this.context = context2;
|
|
45447
46282
|
}
|
|
45448
46283
|
trace(message, data) {
|
|
45449
46284
|
trace({
|
|
@@ -45456,8 +46291,8 @@ var LocalTracer = class _LocalTracer {
|
|
|
45456
46291
|
getContext() {
|
|
45457
46292
|
return this.context;
|
|
45458
46293
|
}
|
|
45459
|
-
setContext(
|
|
45460
|
-
this.context =
|
|
46294
|
+
setContext(context2) {
|
|
46295
|
+
this.context = context2;
|
|
45461
46296
|
}
|
|
45462
46297
|
updateContext(contextToAdd) {
|
|
45463
46298
|
this.context = Object.assign(Object.assign({}, this.context), contextToAdd);
|
|
@@ -45485,8 +46320,8 @@ var LocalTracer = class _LocalTracer {
|
|
|
45485
46320
|
*
|
|
45486
46321
|
* @param context A TraceContext, that can undefined to reset the context
|
|
45487
46322
|
*/
|
|
45488
|
-
withContext(
|
|
45489
|
-
return new _LocalTracer(this.type,
|
|
46323
|
+
withContext(context2) {
|
|
46324
|
+
return new _LocalTracer(this.type, context2);
|
|
45490
46325
|
}
|
|
45491
46326
|
/**
|
|
45492
46327
|
* Create a new instance of the LocalTracer with an updated `context`,
|
|
@@ -45552,7 +46387,7 @@ var __awaiter5 = function(thisArg, _arguments, P2, generator) {
|
|
|
45552
46387
|
};
|
|
45553
46388
|
var DEFAULT_LOG_TYPE = "transport";
|
|
45554
46389
|
var Transport = class {
|
|
45555
|
-
constructor({ context, logType } = {}) {
|
|
46390
|
+
constructor({ context: context2, logType } = {}) {
|
|
45556
46391
|
this.exchangeTimeout = 3e4;
|
|
45557
46392
|
this.unresponsiveTimeout = 15e3;
|
|
45558
46393
|
this.deviceModel = null;
|
|
@@ -45577,7 +46412,7 @@ var Transport = class {
|
|
|
45577
46412
|
return response;
|
|
45578
46413
|
});
|
|
45579
46414
|
this._appAPIlock = null;
|
|
45580
|
-
this.tracer = new LocalTracer(logType !== null && logType !== void 0 ? logType : DEFAULT_LOG_TYPE,
|
|
46415
|
+
this.tracer = new LocalTracer(logType !== null && logType !== void 0 ? logType : DEFAULT_LOG_TYPE, context2);
|
|
45581
46416
|
}
|
|
45582
46417
|
/**
|
|
45583
46418
|
* Send data to the device using a low level API.
|
|
@@ -45792,8 +46627,8 @@ var Transport = class {
|
|
|
45792
46627
|
*
|
|
45793
46628
|
* @param context A TraceContext, that can undefined to reset the context
|
|
45794
46629
|
*/
|
|
45795
|
-
setTraceContext(
|
|
45796
|
-
this.tracer = this.tracer.withContext(
|
|
46630
|
+
setTraceContext(context2) {
|
|
46631
|
+
this.tracer = this.tracer.withContext(context2);
|
|
45797
46632
|
}
|
|
45798
46633
|
/**
|
|
45799
46634
|
* Updates the context used by the logging/tracing mechanism
|
|
@@ -45957,7 +46792,7 @@ var id3;
|
|
|
45957
46792
|
|
|
45958
46793
|
// node_modules/@ledgerhq/hw-transport-webhid/lib-es/TransportWebHID.js
|
|
45959
46794
|
var import_errors3 = __toESM(require_lib());
|
|
45960
|
-
var
|
|
46795
|
+
var __extends5 = /* @__PURE__ */ function() {
|
|
45961
46796
|
var extendStatics = function(d, b2) {
|
|
45962
46797
|
extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b3) {
|
|
45963
46798
|
d2.__proto__ = b3;
|
|
@@ -46081,7 +46916,7 @@ var __generator = function(thisArg, body) {
|
|
|
46081
46916
|
return { value: op[0] ? op[1] : void 0, done: true };
|
|
46082
46917
|
}
|
|
46083
46918
|
};
|
|
46084
|
-
var
|
|
46919
|
+
var __read3 = function(o, n) {
|
|
46085
46920
|
var m2 = typeof Symbol === "function" && o[Symbol.iterator];
|
|
46086
46921
|
if (!m2)
|
|
46087
46922
|
return o;
|
|
@@ -46172,7 +47007,7 @@ function getFirstLedgerDevice() {
|
|
|
46172
47007
|
var TransportWebHID = (
|
|
46173
47008
|
/** @class */
|
|
46174
47009
|
function(_super) {
|
|
46175
|
-
|
|
47010
|
+
__extends5(TransportWebHID2, _super);
|
|
46176
47011
|
function TransportWebHID2(device) {
|
|
46177
47012
|
var _this = _super.call(this) || this;
|
|
46178
47013
|
_this.channel = Math.floor(Math.random() * 65535);
|
|
@@ -46272,7 +47107,7 @@ var TransportWebHID = (
|
|
|
46272
47107
|
case 0:
|
|
46273
47108
|
return [4, requestLedgerDevices()];
|
|
46274
47109
|
case 1:
|
|
46275
|
-
_a2 =
|
|
47110
|
+
_a2 = __read3.apply(void 0, [_b.sent(), 1]), device = _a2[0];
|
|
46276
47111
|
return [2, TransportWebHID2.open(device)];
|
|
46277
47112
|
}
|
|
46278
47113
|
});
|
|
@@ -46922,7 +47757,7 @@ function wait(timeout) {
|
|
|
46922
47757
|
});
|
|
46923
47758
|
});
|
|
46924
47759
|
}
|
|
46925
|
-
function
|
|
47760
|
+
function isFunction2(fn11) {
|
|
46926
47761
|
return typeof fn11 === "function";
|
|
46927
47762
|
}
|
|
46928
47763
|
var defaultSelectAccount = function({ accounts, ledgerUtils }) {
|
|
@@ -46941,7 +47776,7 @@ var defaultSelectAccount = function({ accounts, ledgerUtils }) {
|
|
|
46941
47776
|
});
|
|
46942
47777
|
};
|
|
46943
47778
|
var LedgerWallet = class {
|
|
46944
|
-
constructor(
|
|
47779
|
+
constructor(config3 = {}) {
|
|
46945
47780
|
this.app = null;
|
|
46946
47781
|
this.transport = null;
|
|
46947
47782
|
this.fetchState = "Initial";
|
|
@@ -46985,16 +47820,16 @@ var LedgerWallet = class {
|
|
|
46985
47820
|
}
|
|
46986
47821
|
});
|
|
46987
47822
|
this.accounts = [];
|
|
46988
|
-
const { accountNumber = 1 } =
|
|
47823
|
+
const { accountNumber = 1 } = config3;
|
|
46989
47824
|
["beforeConnect", "selectAccount", "getDerivationPath"].forEach((func) => {
|
|
46990
|
-
if (
|
|
47825
|
+
if (config3[func] && !isFunction2(config3[func])) {
|
|
46991
47826
|
throw new Error(`[Ledger]: ${func} must be a function!`);
|
|
46992
47827
|
}
|
|
46993
47828
|
});
|
|
46994
47829
|
if (accountNumber && !Number.isInteger(+accountNumber)) {
|
|
46995
47830
|
throw new Error("[Ledger]: accountNumber must be an integer!");
|
|
46996
47831
|
}
|
|
46997
|
-
this.config = Object.assign(Object.assign({},
|
|
47832
|
+
this.config = Object.assign(Object.assign({}, config3), { accountNumber });
|
|
46998
47833
|
}
|
|
46999
47834
|
get address() {
|
|
47000
47835
|
return this._address;
|
|
@@ -47165,7 +48000,7 @@ var __awaiter9 = function(thisArg, _arguments, P2, generator) {
|
|
|
47165
48000
|
var isSupportedLedger = () => !!(globalThis.navigator && globalThis.navigator.hid);
|
|
47166
48001
|
var LedgerAdapterName = "Ledger";
|
|
47167
48002
|
var LedgerAdapter = class extends Adapter {
|
|
47168
|
-
constructor(
|
|
48003
|
+
constructor(config3 = {}) {
|
|
47169
48004
|
super();
|
|
47170
48005
|
this.name = LedgerAdapterName;
|
|
47171
48006
|
this.url = "https://www.ledger.com/";
|
|
@@ -47174,8 +48009,8 @@ var LedgerAdapter = class extends Adapter {
|
|
|
47174
48009
|
this._state = AdapterState.NotFound;
|
|
47175
48010
|
this._connecting = false;
|
|
47176
48011
|
this._address = null;
|
|
47177
|
-
this.config =
|
|
47178
|
-
this._wallet = new LedgerWallet(
|
|
48012
|
+
this.config = config3;
|
|
48013
|
+
this._wallet = new LedgerWallet(config3);
|
|
47179
48014
|
if (isSupportedLedger()) {
|
|
47180
48015
|
this._readyState = WalletReadyState.Found;
|
|
47181
48016
|
this._state = AdapterState.Disconnect;
|
|
@@ -47295,7 +48130,6 @@ var bitget_default = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJAAAACQCAMA
|
|
|
47295
48130
|
var ledger = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyOCIgaGVpZ2h0PSIyOCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzAwMCIgZD0iTTAgMGgyOHYyOEgweiIvPjxwYXRoIGZpbGw9IiNmZmYiIGZpbGwtcnVsZT0iZXZlbm9kZCIgZD0iTTExLjY1IDQuNEg0LjRWOWgxLjFWNS41bDYuMTUtLjA0VjQuNFptLjA1IDUuOTV2Ny4yNWg0LjZ2LTEuMWgtMy41bC0uMDQtNi4xNUgxMS43Wk00LjQgMjMuNmg3LjI1di0xLjA2TDUuNSAyMi41VjE5SDQuNHY0LjZaTTE2LjM1IDQuNGg3LjI1VjloLTEuMVY1LjVsLTYuMTUtLjA0VjQuNFptNy4yNSAxOS4yaC03LjI1di0xLjA2bDYuMTUtLjA0VjE5aDEuMXY0LjZaIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=";
|
|
47296
48131
|
|
|
47297
48132
|
// src/providers/misc/tron-connector.ts
|
|
47298
|
-
import { BehaviorSubject as BehaviorSubject3 } from "rxjs";
|
|
47299
48133
|
var configMeta2 = {
|
|
47300
48134
|
tronLink: {
|
|
47301
48135
|
id: "tronLink",
|
|
@@ -47323,14 +48157,14 @@ var createTronConnector = ({
|
|
|
47323
48157
|
adapter,
|
|
47324
48158
|
metaConfig,
|
|
47325
48159
|
walletDetailsParams
|
|
47326
|
-
}) => createConnector8((
|
|
48160
|
+
}) => createConnector8((config3) => ({
|
|
47327
48161
|
...walletDetailsParams,
|
|
47328
48162
|
id: configMeta2[metaConfig].id,
|
|
47329
48163
|
name: configMeta2[metaConfig].name,
|
|
47330
48164
|
type: configMeta2[metaConfig].type,
|
|
47331
48165
|
signTransaction: adapter.signTransaction.bind(adapter),
|
|
47332
48166
|
connect: async () => {
|
|
47333
|
-
|
|
48167
|
+
config3.emitter.emit("message", { type: "connecting" });
|
|
47334
48168
|
await adapter.connect();
|
|
47335
48169
|
setStorageItem("sk-widget@1//shimDisconnect/tron", true);
|
|
47336
48170
|
return {
|
|
@@ -47354,19 +48188,19 @@ var createTronConnector = ({
|
|
|
47354
48188
|
isAuthorized: async () => getStorageItem("sk-widget@1//shimDisconnect/tron").map((val) => !!(val && adapter.connected && adapter.address)).orDefault(false),
|
|
47355
48189
|
onAccountsChanged: (accounts) => {
|
|
47356
48190
|
if (accounts.length === 0) {
|
|
47357
|
-
|
|
48191
|
+
config3.emitter.emit("disconnect");
|
|
47358
48192
|
} else {
|
|
47359
|
-
|
|
48193
|
+
config3.emitter.emit("change", { accounts });
|
|
47360
48194
|
}
|
|
47361
48195
|
},
|
|
47362
48196
|
onChainChanged: (chainId) => {
|
|
47363
|
-
|
|
48197
|
+
config3.emitter.emit("change", { chainId: normalizeChainId(chainId) });
|
|
47364
48198
|
},
|
|
47365
48199
|
onDisconnect: () => {
|
|
47366
|
-
|
|
48200
|
+
config3.emitter.emit("disconnect");
|
|
47367
48201
|
},
|
|
47368
48202
|
getProvider: async () => ({}),
|
|
47369
|
-
$filteredChains: new
|
|
48203
|
+
$filteredChains: new BehaviorSubject([tron]).asObservable()
|
|
47370
48204
|
}));
|
|
47371
48205
|
var tronConnector = {
|
|
47372
48206
|
groupName: "Tron",
|
|
@@ -49850,7 +50684,6 @@ var getLedgerCurrencies = (walletAPIClient) => EitherAsync12(() => walletAPIClie
|
|
|
49850
50684
|
});
|
|
49851
50685
|
|
|
49852
50686
|
// src/providers/ledger/ledger-connector.ts
|
|
49853
|
-
import { BehaviorSubject as BehaviorSubject4, map } from "rxjs";
|
|
49854
50687
|
var configMeta3 = {
|
|
49855
50688
|
id: "ledgerLive",
|
|
49856
50689
|
name: "Ledger Live",
|
|
@@ -49861,14 +50694,14 @@ var createLedgerLiveConnector = ({
|
|
|
49861
50694
|
walletDetailsParams,
|
|
49862
50695
|
enabledChainsMap,
|
|
49863
50696
|
queryParams
|
|
49864
|
-
}) => createConnector9((
|
|
50697
|
+
}) => createConnector9((config3) => {
|
|
49865
50698
|
const noAccountPlaceholder = "N/A";
|
|
49866
|
-
const $filteredChains = new
|
|
49867
|
-
const $disabledChains = new
|
|
49868
|
-
const $currentAccount = new
|
|
50699
|
+
const $filteredChains = new BehaviorSubject([]);
|
|
50700
|
+
const $disabledChains = new BehaviorSubject([]);
|
|
50701
|
+
const $currentAccount = new BehaviorSubject(void 0);
|
|
49869
50702
|
const $currentAccountId = $currentAccount.pipe(map((v) => v?.id));
|
|
49870
50703
|
let ledgerAccounts = [];
|
|
49871
|
-
const $accountsOnCurrentChain = new
|
|
50704
|
+
const $accountsOnCurrentChain = new BehaviorSubject([]);
|
|
49872
50705
|
let currentChain = null;
|
|
49873
50706
|
let filteredSkSupportedChainsToCurrencyIdMap = null;
|
|
49874
50707
|
let filteredSkSupportedChainsValues = null;
|
|
@@ -49876,7 +50709,7 @@ var createLedgerLiveConnector = ({
|
|
|
49876
50709
|
transport.connect();
|
|
49877
50710
|
const walletApiClient = new WalletAPIClient(transport);
|
|
49878
50711
|
const connect = async () => {
|
|
49879
|
-
|
|
50712
|
+
config3.emitter.emit("message", { type: "connecting" });
|
|
49880
50713
|
const ledgerCurrencies = (await getLedgerCurrencies(walletApiClient)).unsafeCoerce();
|
|
49881
50714
|
const accounts = (await EitherAsync13(() => walletApiClient.account.list()).mapLeft((e) => {
|
|
49882
50715
|
console.log(e);
|
|
@@ -49969,16 +50802,16 @@ var createLedgerLiveConnector = ({
|
|
|
49969
50802
|
);
|
|
49970
50803
|
const onAccountsChanged = (accounts) => {
|
|
49971
50804
|
if (accounts.length === 0) {
|
|
49972
|
-
|
|
50805
|
+
config3.emitter.emit("disconnect");
|
|
49973
50806
|
} else {
|
|
49974
|
-
|
|
50807
|
+
config3.emitter.emit("change", { accounts });
|
|
49975
50808
|
}
|
|
49976
50809
|
};
|
|
49977
50810
|
const onChainChanged = (chainId) => {
|
|
49978
|
-
|
|
50811
|
+
config3.emitter.emit("change", { chainId: normalizeChainId2(chainId) });
|
|
49979
50812
|
};
|
|
49980
50813
|
const onDisconnect = () => {
|
|
49981
|
-
|
|
50814
|
+
config3.emitter.emit("disconnect");
|
|
49982
50815
|
};
|
|
49983
50816
|
const getProvider = async () => ({});
|
|
49984
50817
|
const isAuthorized = async () => isLedgerDappBrowserProvider();
|
|
@@ -50212,7 +51045,6 @@ import {
|
|
|
50212
51045
|
createConnector as createConnector10,
|
|
50213
51046
|
normalizeChainId as normalizeChainId3
|
|
50214
51047
|
} from "wagmi";
|
|
50215
|
-
import { BehaviorSubject as BehaviorSubject5 } from "rxjs";
|
|
50216
51048
|
var configMeta4 = {
|
|
50217
51049
|
id: "externalProviderConnector",
|
|
50218
51050
|
name: "External Provider",
|
|
@@ -50227,8 +51059,8 @@ var externalProviderConnector = (variant, transactionGetTransactionStatusByNetwo
|
|
|
50227
51059
|
name: configMeta4.name,
|
|
50228
51060
|
iconUrl: getSKIcon("sk-icon_320x320.png"),
|
|
50229
51061
|
iconBackground: "#fff",
|
|
50230
|
-
createConnector: () => createConnector10((
|
|
50231
|
-
const $filteredChains = new
|
|
51062
|
+
createConnector: () => createConnector10((config3) => {
|
|
51063
|
+
const $filteredChains = new BehaviorSubject([]);
|
|
50232
51064
|
const provider = new ExternalProvider(
|
|
50233
51065
|
variant,
|
|
50234
51066
|
transactionGetTransactionStatusByNetworkAndHash
|
|
@@ -50236,13 +51068,13 @@ var externalProviderConnector = (variant, transactionGetTransactionStatusByNetwo
|
|
|
50236
51068
|
const getAccounts = async () => (await provider.getAccount().map((val) => [val])).unsafeCoerce();
|
|
50237
51069
|
const getChainId = async () => (await provider.getChainId()).unsafeCoerce();
|
|
50238
51070
|
const connect = async () => {
|
|
50239
|
-
|
|
51071
|
+
config3.emitter.emit("message", { type: "connecting" });
|
|
50240
51072
|
const [accounts, chainId] = await Promise.all([
|
|
50241
51073
|
getAccounts(),
|
|
50242
51074
|
getChainId()
|
|
50243
51075
|
]);
|
|
50244
51076
|
$filteredChains.next(
|
|
50245
|
-
|
|
51077
|
+
config3.chains.filter((c) => c.id === chainId)
|
|
50246
51078
|
);
|
|
50247
51079
|
return { accounts, chainId };
|
|
50248
51080
|
};
|
|
@@ -50250,7 +51082,7 @@ var externalProviderConnector = (variant, transactionGetTransactionStatusByNetwo
|
|
|
50250
51082
|
return (await EitherAsync15.liftEither(
|
|
50251
51083
|
List3.find(
|
|
50252
51084
|
(c) => c.id === chainId,
|
|
50253
|
-
|
|
51085
|
+
config3.chains
|
|
50254
51086
|
).toEither(new Error("Chain not found"))
|
|
50255
51087
|
).chain(
|
|
50256
51088
|
(chain) => provider.switchChain({ chainId: `0x${chainId.toString(16)}` }).map(() => chain)
|
|
@@ -50261,10 +51093,10 @@ var externalProviderConnector = (variant, transactionGetTransactionStatusByNetwo
|
|
|
50261
51093
|
const getProvider = async () => ({});
|
|
50262
51094
|
const isAuthorized = async () => true;
|
|
50263
51095
|
const onDisconnect = () => {
|
|
50264
|
-
|
|
51096
|
+
config3.emitter.emit("disconnect");
|
|
50265
51097
|
};
|
|
50266
51098
|
const onChainChanged = (chainId) => {
|
|
50267
|
-
|
|
51099
|
+
config3.emitter.emit("change", {
|
|
50268
51100
|
chainId: normalizeChainId3(chainId)
|
|
50269
51101
|
});
|
|
50270
51102
|
};
|
|
@@ -50623,9 +51455,8 @@ import { Either as Either2, EitherAsync as EitherAsync21, Left as Left7, Maybe a
|
|
|
50623
51455
|
|
|
50624
51456
|
// src/providers/sk-wallet/use-ledger-accounts.ts
|
|
50625
51457
|
import { useCallback as useCallback12, useState as useState21, useSyncExternalStore as useSyncExternalStore3 } from "react";
|
|
50626
|
-
import { BehaviorSubject as BehaviorSubject6 } from "rxjs";
|
|
50627
51458
|
var useLedgerAccounts = (connector) => {
|
|
50628
|
-
const [subject] = useState21(() => new
|
|
51459
|
+
const [subject] = useState21(() => new BehaviorSubject([]));
|
|
50629
51460
|
const subscribe3 = useCallback12(
|
|
50630
51461
|
(onChange) => {
|
|
50631
51462
|
if (!connector || !isLedgerLiveConnector(connector)) {
|
|
@@ -50885,11 +51716,11 @@ var TrackingContextProvider = ({
|
|
|
50885
51716
|
return /* @__PURE__ */ jsx6(TrackingContext.Provider, { value, children });
|
|
50886
51717
|
};
|
|
50887
51718
|
var useTracking = () => {
|
|
50888
|
-
const
|
|
50889
|
-
if (
|
|
51719
|
+
const context2 = useContext30(TrackingContext);
|
|
51720
|
+
if (context2 === void 0) {
|
|
50890
51721
|
throw new Error("useTracking must be used within a TrackingContext");
|
|
50891
51722
|
}
|
|
50892
|
-
return
|
|
51723
|
+
return context2;
|
|
50893
51724
|
};
|
|
50894
51725
|
|
|
50895
51726
|
// src/hooks/tracking/use-track-event.ts
|
|
@@ -50904,12 +51735,11 @@ var isConnectorWithFilteredChains = (connector) => {
|
|
|
50904
51735
|
};
|
|
50905
51736
|
|
|
50906
51737
|
// src/providers/sk-wallet/use-connector-chains.ts
|
|
50907
|
-
import { BehaviorSubject as BehaviorSubject7 } from "rxjs";
|
|
50908
51738
|
var useConnectorChains = ({
|
|
50909
51739
|
wagmiConfig,
|
|
50910
51740
|
connector
|
|
50911
51741
|
}) => {
|
|
50912
|
-
const [subject] = useState23(() => new
|
|
51742
|
+
const [subject] = useState23(() => new BehaviorSubject([]));
|
|
50913
51743
|
const subscribe3 = useCallback14(
|
|
50914
51744
|
(onChange) => {
|
|
50915
51745
|
if (!connector || !isConnectorWithFilteredChains(connector)) {
|
|
@@ -50937,10 +51767,9 @@ var defaultValue = [];
|
|
|
50937
51767
|
|
|
50938
51768
|
// src/providers/sk-wallet/use-ledger-current-account-id.ts
|
|
50939
51769
|
import { useCallback as useCallback15, useState as useState24, useSyncExternalStore as useSyncExternalStore5 } from "react";
|
|
50940
|
-
import { BehaviorSubject as BehaviorSubject8 } from "rxjs";
|
|
50941
51770
|
var useLedgerCurrentAccountId = (connector) => {
|
|
50942
51771
|
const [subject] = useState24(
|
|
50943
|
-
() => new
|
|
51772
|
+
() => new BehaviorSubject(void 0)
|
|
50944
51773
|
);
|
|
50945
51774
|
const subscribe3 = useCallback15(
|
|
50946
51775
|
(onChange) => {
|
|
@@ -51304,13 +52133,13 @@ var ActionHistoryContextProvider = ({
|
|
|
51304
52133
|
return /* @__PURE__ */ jsx8(ActionHistoryContext.Provider, { value, children });
|
|
51305
52134
|
};
|
|
51306
52135
|
var useActionHistory = () => {
|
|
51307
|
-
const
|
|
51308
|
-
if (
|
|
52136
|
+
const context2 = useContext33(ActionHistoryContext);
|
|
52137
|
+
if (context2 === void 0) {
|
|
51309
52138
|
throw new Error(
|
|
51310
52139
|
"useActionHistory must be used within a ActionHistoryContextProvider"
|
|
51311
52140
|
);
|
|
51312
52141
|
}
|
|
51313
|
-
return
|
|
52142
|
+
return context2;
|
|
51314
52143
|
};
|
|
51315
52144
|
var useActionHistoryData = () => useActionHistory()[0];
|
|
51316
52145
|
var useSetActionHistoryData = () => useActionHistory()[1];
|
|
@@ -52653,8 +53482,8 @@ var useSyncElementHeight = (setCurrentHeight) => {
|
|
|
52653
53482
|
// src/utils/create-state-context.ts
|
|
52654
53483
|
import { createContext as createContext25, createElement as createElement4, useContext as useContext38, useState as useState26 } from "react";
|
|
52655
53484
|
var createStateContext = (defaultInitialValue) => {
|
|
52656
|
-
const
|
|
52657
|
-
const providerFactory = (props, children) => createElement4(
|
|
53485
|
+
const context2 = createContext25(void 0);
|
|
53486
|
+
const providerFactory = (props, children) => createElement4(context2.Provider, props, children);
|
|
52658
53487
|
const StateProvider = ({
|
|
52659
53488
|
children,
|
|
52660
53489
|
initialValue
|
|
@@ -52665,13 +53494,13 @@ var createStateContext = (defaultInitialValue) => {
|
|
|
52665
53494
|
return providerFactory({ value: state }, children);
|
|
52666
53495
|
};
|
|
52667
53496
|
const useStateContext = () => {
|
|
52668
|
-
const state = useContext38(
|
|
53497
|
+
const state = useContext38(context2);
|
|
52669
53498
|
if (state == null) {
|
|
52670
53499
|
throw new Error(`useStateContext must be used inside a StateProvider.`);
|
|
52671
53500
|
}
|
|
52672
53501
|
return state;
|
|
52673
53502
|
};
|
|
52674
|
-
return [useStateContext, StateProvider,
|
|
53503
|
+
return [useStateContext, StateProvider, context2];
|
|
52675
53504
|
};
|
|
52676
53505
|
var create_state_context_default = createStateContext;
|
|
52677
53506
|
|
|
@@ -55228,13 +56057,13 @@ var ListStateContextProvider = ({ children }) => {
|
|
|
55228
56057
|
return /* @__PURE__ */ jsx50(ListStateContext.Provider, { value, children });
|
|
55229
56058
|
};
|
|
55230
56059
|
var useListState = () => {
|
|
55231
|
-
const
|
|
55232
|
-
if (!
|
|
56060
|
+
const context2 = useContext44(ListStateContext);
|
|
56061
|
+
if (!context2) {
|
|
55233
56062
|
throw new Error(
|
|
55234
56063
|
"useListStateContext must be used within a ListStateContextProvider"
|
|
55235
56064
|
);
|
|
55236
56065
|
}
|
|
55237
|
-
return
|
|
56066
|
+
return context2;
|
|
55238
56067
|
};
|
|
55239
56068
|
var useHandleListState = () => {
|
|
55240
56069
|
const virtualListRef = useRef13(null);
|
|
@@ -55336,13 +56165,13 @@ var MountAnimationProvider = ({ children }) => {
|
|
|
55336
56165
|
return /* @__PURE__ */ jsx52(MountAnimationContext.Provider, { value, children });
|
|
55337
56166
|
};
|
|
55338
56167
|
var useMountAnimation = () => {
|
|
55339
|
-
const
|
|
55340
|
-
if (!
|
|
56168
|
+
const context2 = useContext46(MountAnimationContext);
|
|
56169
|
+
if (!context2) {
|
|
55341
56170
|
throw new Error(
|
|
55342
56171
|
"useMountAnimation must be used within a MountAnimationProvider"
|
|
55343
56172
|
);
|
|
55344
56173
|
}
|
|
55345
|
-
return
|
|
56174
|
+
return context2;
|
|
55346
56175
|
};
|
|
55347
56176
|
|
|
55348
56177
|
// src/pages/details/positions-page/positions.page.tsx
|
|
@@ -56277,11 +57106,11 @@ var DetailsContextProvider = ({ children }) => {
|
|
|
56277
57106
|
return /* @__PURE__ */ jsx54(DetailsContext.Provider, { value, children });
|
|
56278
57107
|
};
|
|
56279
57108
|
var useDetailsContext = () => {
|
|
56280
|
-
const
|
|
56281
|
-
if (!
|
|
57109
|
+
const context2 = useContext47(DetailsContext);
|
|
57110
|
+
if (!context2) {
|
|
56282
57111
|
throw new Error("useDetailsContext must be used within a DetailsContext");
|
|
56283
57112
|
}
|
|
56284
|
-
return
|
|
57113
|
+
return context2;
|
|
56285
57114
|
};
|
|
56286
57115
|
|
|
56287
57116
|
// src/components/atoms/icons/info.tsx
|
|
@@ -59028,7 +59857,7 @@ var createReducer = function createReducer2(definition) {
|
|
|
59028
59857
|
var event = typeof sendable === "string" ? {
|
|
59029
59858
|
type: sendable
|
|
59030
59859
|
} : sendable;
|
|
59031
|
-
var
|
|
59860
|
+
var context2 = machineState.context;
|
|
59032
59861
|
var stateNode = R2.get(definition.states, machineState.value);
|
|
59033
59862
|
var resolvedTransition = (_R$get = R2.get(R2.fromMaybe(stateNode.on), event.type)) != null ? _R$get : R2.get(R2.fromMaybe(definition.on), event.type);
|
|
59034
59863
|
if (!resolvedTransition) {
|
|
@@ -59041,14 +59870,14 @@ var createReducer = function createReducer2(definition) {
|
|
|
59041
59870
|
if (resolvedTransition.guard === void 0)
|
|
59042
59871
|
return [resolvedTransition.target];
|
|
59043
59872
|
if (resolvedTransition.guard({
|
|
59044
|
-
context,
|
|
59873
|
+
context: context2,
|
|
59045
59874
|
event
|
|
59046
59875
|
}))
|
|
59047
59876
|
return [resolvedTransition.target];
|
|
59048
59877
|
return [resolvedTransition.target, true];
|
|
59049
59878
|
}(), nextStateValue = _ref[0], _ref$ = _ref[1], didGuardDeny = _ref$ === void 0 ? false : _ref$;
|
|
59050
59879
|
if (didGuardDeny) {
|
|
59051
|
-
log2('Transition from "' + machineState.value + '" to "' + nextStateValue + '" denied by guard', ["Event", event], ["Context",
|
|
59880
|
+
log2('Transition from "' + machineState.value + '" to "' + nextStateValue + '" denied by guard', ["Event", event], ["Context", context2]);
|
|
59052
59881
|
return machineState;
|
|
59053
59882
|
}
|
|
59054
59883
|
log2('Transition from "' + machineState.value + '" to "' + nextStateValue + '"', ["Event", event]);
|
|
@@ -59056,7 +59885,7 @@ var createReducer = function createReducer2(definition) {
|
|
|
59056
59885
|
var nextEvents = R2.keys(R2.concat(R2.fromMaybe(resolvedStateNode.on), R2.fromMaybe(definition.on)));
|
|
59057
59886
|
return {
|
|
59058
59887
|
value: nextStateValue,
|
|
59059
|
-
context,
|
|
59888
|
+
context: context2,
|
|
59060
59889
|
event,
|
|
59061
59890
|
nextEvents,
|
|
59062
59891
|
nextEventsT: nextEvents
|
|
@@ -59165,10 +59994,10 @@ var useStepsMachine = (session) => {
|
|
|
59165
59994
|
BROADCAST_SUCCESS: "txCheckLoading",
|
|
59166
59995
|
DONE: "done"
|
|
59167
59996
|
},
|
|
59168
|
-
effect: ({ context, send, setContext }) => {
|
|
59997
|
+
effect: ({ context: context2, send, setContext }) => {
|
|
59169
59998
|
EitherAsync34.liftEither(
|
|
59170
59999
|
Maybe46.fromNullable(
|
|
59171
|
-
|
|
60000
|
+
context2.txStates[context2.currentTxMeta?.idx].tx
|
|
59172
60001
|
).toEither(new Error("missing tx"))
|
|
59173
60002
|
).chain((tx) => {
|
|
59174
60003
|
if (shouldMultiSend) {
|
|
@@ -59249,7 +60078,7 @@ var useStepsMachine = (session) => {
|
|
|
59249
60078
|
).map(() => ({ type: "p2pNode" }));
|
|
59250
60079
|
}
|
|
59251
60080
|
return EitherAsync34.liftEither(
|
|
59252
|
-
Right16(
|
|
60081
|
+
Right16(context2.txStates[context2.currentTxMeta?.idx].tx)
|
|
59253
60082
|
).chain(
|
|
59254
60083
|
(tx2) => getAverageGasMode({
|
|
59255
60084
|
network: tx2.network,
|
|
@@ -59279,7 +60108,7 @@ var useStepsMachine = (session) => {
|
|
|
59279
60108
|
() => trackEvent("txSigned", {
|
|
59280
60109
|
txId: constructedTx.id,
|
|
59281
60110
|
network: constructedTx.network,
|
|
59282
|
-
yieldId:
|
|
60111
|
+
yieldId: context2.yieldId
|
|
59283
60112
|
})
|
|
59284
60113
|
);
|
|
59285
60114
|
}).map((val) => ({ type: "regular", data: val }));
|
|
@@ -59333,10 +60162,10 @@ var useStepsMachine = (session) => {
|
|
|
59333
60162
|
BROADCAST_SUCCESS: "txCheckLoading",
|
|
59334
60163
|
BROADCAST_ERROR: "broadcastError"
|
|
59335
60164
|
},
|
|
59336
|
-
effect: ({ send, context, setContext }) => {
|
|
60165
|
+
effect: ({ send, context: context2, setContext }) => {
|
|
59337
60166
|
EitherAsync34.liftEither(
|
|
59338
60167
|
Maybe46.fromNullable(
|
|
59339
|
-
|
|
60168
|
+
context2.txStates[context2.currentTxMeta?.idx]
|
|
59340
60169
|
).toEither(new Error("missing tx"))
|
|
59341
60170
|
).chain((currentTx) => {
|
|
59342
60171
|
if (currentTx.meta.broadcasted) {
|
|
@@ -59348,7 +60177,7 @@ var useStepsMachine = (session) => {
|
|
|
59348
60177
|
trackEvent("txSubmitted", {
|
|
59349
60178
|
txId: currentTx.tx.id,
|
|
59350
60179
|
network: currentTx.tx.network,
|
|
59351
|
-
yieldId:
|
|
60180
|
+
yieldId: context2.yieldId
|
|
59352
60181
|
});
|
|
59353
60182
|
});
|
|
59354
60183
|
} else {
|
|
@@ -59362,7 +60191,7 @@ var useStepsMachine = (session) => {
|
|
|
59362
60191
|
trackEvent("txSubmitted", {
|
|
59363
60192
|
txId: currentTx.tx.id,
|
|
59364
60193
|
network: currentTx.tx.network,
|
|
59365
|
-
yieldId:
|
|
60194
|
+
yieldId: context2.yieldId
|
|
59366
60195
|
});
|
|
59367
60196
|
});
|
|
59368
60197
|
}
|
|
@@ -59413,10 +60242,10 @@ var useStepsMachine = (session) => {
|
|
|
59413
60242
|
TX_CHECK_ERROR: "txCheckError",
|
|
59414
60243
|
TX_CHECK_RETRY: "txCheckRetry"
|
|
59415
60244
|
},
|
|
59416
|
-
effect: ({ send, context, setContext }) => {
|
|
60245
|
+
effect: ({ send, context: context2, setContext }) => {
|
|
59417
60246
|
EitherAsync34.liftEither(
|
|
59418
60247
|
Maybe46.fromNullable(
|
|
59419
|
-
|
|
60248
|
+
context2.txStates[context2.currentTxMeta?.idx]
|
|
59420
60249
|
).toEither(new Error("missing tx"))
|
|
59421
60250
|
).chain(
|
|
59422
60251
|
(currentTx) => withRequestErrorRetry({
|
|
@@ -59448,7 +60277,7 @@ var useStepsMachine = (session) => {
|
|
|
59448
60277
|
if (l instanceof SignError) {
|
|
59449
60278
|
trackEvent("txNotConfirmed", {
|
|
59450
60279
|
txId: l.txId,
|
|
59451
|
-
yieldId:
|
|
60280
|
+
yieldId: context2.yieldId
|
|
59452
60281
|
});
|
|
59453
60282
|
}
|
|
59454
60283
|
setContext((ctx) => ({
|
|
@@ -59468,8 +60297,8 @@ var useStepsMachine = (session) => {
|
|
|
59468
60297
|
},
|
|
59469
60298
|
Right: (v) => {
|
|
59470
60299
|
if (v.isConfirmed) {
|
|
59471
|
-
const newTxStates =
|
|
59472
|
-
(val, i) => i ===
|
|
60300
|
+
const newTxStates = context2.txStates.map(
|
|
60301
|
+
(val, i) => i === context2.currentTxMeta?.idx ? {
|
|
59473
60302
|
...val,
|
|
59474
60303
|
meta: {
|
|
59475
60304
|
...val.meta,
|
|
@@ -60124,20 +60953,20 @@ import { jsx as jsx91 } from "react/jsx-runtime";
|
|
|
60124
60953
|
var queryKey7 = ["wagmi-config", "on-mount"];
|
|
60125
60954
|
var WagmiConfigProvider = ({ children }) => {
|
|
60126
60955
|
const wagmiConfig = useWagmiConfig();
|
|
60127
|
-
const
|
|
60956
|
+
const config3 = wagmiConfig.data?.wagmiConfig;
|
|
60128
60957
|
useQuery12({
|
|
60129
60958
|
queryKey: queryKey7,
|
|
60130
60959
|
staleTime: Infinity,
|
|
60131
|
-
enabled: !!
|
|
60960
|
+
enabled: !!config3,
|
|
60132
60961
|
queryFn: async () => {
|
|
60133
|
-
if (
|
|
60134
|
-
const { onMount } = hydrate(
|
|
60962
|
+
if (config3) {
|
|
60963
|
+
const { onMount } = hydrate(config3, { reconnectOnMount: true });
|
|
60135
60964
|
await EitherAsync35(onMount);
|
|
60136
60965
|
}
|
|
60137
60966
|
return null;
|
|
60138
60967
|
}
|
|
60139
60968
|
});
|
|
60140
|
-
return /* @__PURE__ */ jsx91(WagmiContext.Provider, { value:
|
|
60969
|
+
return /* @__PURE__ */ jsx91(WagmiContext.Provider, { value: config3 ?? defaultConfig, children });
|
|
60141
60970
|
};
|
|
60142
60971
|
|
|
60143
60972
|
// src/providers/rainbow-kit.tsx
|
|
@@ -60145,9 +60974,8 @@ import { useMemo as useMemo62 } from "react";
|
|
|
60145
60974
|
|
|
60146
60975
|
// src/providers/sk-wallet/use-ledger-disabled-chains.ts
|
|
60147
60976
|
import { useCallback as useCallback24, useState as useState45, useSyncExternalStore as useSyncExternalStore7 } from "react";
|
|
60148
|
-
import { BehaviorSubject as BehaviorSubject9 } from "rxjs";
|
|
60149
60977
|
var useLedgerDisabledChain = (connector) => {
|
|
60150
|
-
const [subject] = useState45(() => new
|
|
60978
|
+
const [subject] = useState45(() => new BehaviorSubject([]));
|
|
60151
60979
|
const subscribe3 = useCallback24(
|
|
60152
60980
|
(onChange) => {
|
|
60153
60981
|
if (!connector || !isLedgerLiveConnector(connector)) {
|
|
@@ -60845,10 +61673,10 @@ var useUnstakeMachine = () => {
|
|
|
60845
61673
|
__UNSTAKE_SIGN_MESSAGE_SUCCESS__: "unstakeLoading",
|
|
60846
61674
|
__UNSTAKE_SIGN_MESSAGE_ERROR__: "unstakeSignMessageError"
|
|
60847
61675
|
},
|
|
60848
|
-
effect: ({ send, context, setContext }) => {
|
|
61676
|
+
effect: ({ send, context: context2, setContext }) => {
|
|
60849
61677
|
EitherAsync37.liftEither(
|
|
60850
61678
|
Maybe52.fromNullable(
|
|
60851
|
-
|
|
61679
|
+
context2.transactionVerificationMessageDto
|
|
60852
61680
|
).toEither(new Error("Missing transaction verification message"))
|
|
60853
61681
|
).chain((val) => signMessage(val.message)).caseOf({
|
|
60854
61682
|
Right(v) {
|
|
@@ -60868,17 +61696,17 @@ var useUnstakeMachine = () => {
|
|
|
60868
61696
|
unstakeSignMessageError: {},
|
|
60869
61697
|
unstakeLoading: {
|
|
60870
61698
|
on: { __UNSTAKE_ERROR__: "unstakeError" },
|
|
60871
|
-
effect: ({ context, setContext, send }) => {
|
|
61699
|
+
effect: ({ context: context2, setContext, send }) => {
|
|
60872
61700
|
EitherAsync37.liftEither(
|
|
60873
61701
|
stakeExitRequestDto.toEither(new Error("Missing params"))
|
|
60874
61702
|
).chain(
|
|
60875
61703
|
(val) => EitherAsync37(() => {
|
|
60876
|
-
const stakeRequestDto =
|
|
61704
|
+
const stakeRequestDto = context2.transactionVerificationMessageDto && context2.signedMessage ? merge2(val, {
|
|
60877
61705
|
dto: {
|
|
60878
61706
|
args: {
|
|
60879
61707
|
signatureVerification: {
|
|
60880
|
-
message:
|
|
60881
|
-
signed:
|
|
61708
|
+
message: context2.transactionVerificationMessageDto.message,
|
|
61709
|
+
signed: context2.signedMessage
|
|
60882
61710
|
}
|
|
60883
61711
|
}
|
|
60884
61712
|
}
|
|
@@ -61145,11 +61973,11 @@ var CopyTextContext = createContext34(
|
|
|
61145
61973
|
void 0
|
|
61146
61974
|
);
|
|
61147
61975
|
var useCopyText = () => {
|
|
61148
|
-
const
|
|
61149
|
-
if (!
|
|
61976
|
+
const context2 = useContext49(CopyTextContext);
|
|
61977
|
+
if (!context2) {
|
|
61150
61978
|
throw new Error("useCopyText must be used within a CopyTextProvider");
|
|
61151
61979
|
}
|
|
61152
|
-
return
|
|
61980
|
+
return context2;
|
|
61153
61981
|
};
|
|
61154
61982
|
var Provider2 = ({
|
|
61155
61983
|
text,
|