Closed jstashh closed 2 years ago
Path | Size |
---|---|
dist/sdk.cjs.production.min.js | 43.17 KB (+0.02% 🔺) |
dist/sdk.esm.js | 43.38 KB (-0.01% 🔽) |
Removing the limitation might be best imo. If this fix its easier for now, lets go with it, but lets make sure it does not affect in some way in other places. Seems like it might be an issue here https://github.com/yearn/yearn-sdk/blob/master/src/services/zapper.ts#L265 ?
@xgambitox won't that evaluate to false since it's an empty string?
@xgambitox won't that evaluate to false since it's an empty string?
Yes you are right. Right now seems to be no problem then, but in the future there is the possibility an error is introduced by a dev using partnerId === undefined
.
Previously the SDK immediately crashed when instantiated without a
partnerId
being provided in theContext
object.partnerId
should be something not required to use the SDK.We need to give it a value because
export class Context implements Required<ContextValue> {
usesRequired
, so it can't be optional. Although maybe we should remove this limitation