Skip to content

use of Iterator.prototype.reduce in the core-sdk breaks compatiblity with browsers #268

Open
@elee1766

Description

@elee1766

see here:

https://github.com/morpho-org/sdks/blob/main/packages/blue-sdk/src/vault/Vault.ts#L263-L287
https://github.com/morpho-org/sdks/blob/main/packages/blue-sdk/src/vault/Vault.ts#L305-L319

where Iterator.prototype.reduce (values().reduce) is being called.

this is actually not implemented in all browsers yet:

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Iterator/reduce

importantly, it is not implemented in both safari and firefox esr (128)

it would probably be good to implement the sdks without Iterator.prototype.reduce to maximize compatibility.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions