aptos-labs / aptos-ts-sdk

An SDK for accessing the Aptos blockchain data, submitting transactions, and more!
https://aptos-labs.github.io/aptos-ts-sdk/
Apache License 2.0
67 stars 37 forks source link

[core] Remove `instanceof` where input might come from other bundle #462

Closed hardsetting closed 1 month ago

hardsetting commented 1 month ago

Description

The usage of instanceof keeps causing a lot of problem, specifically when using the TS sdk from different bundles. Sometimes this is due to misconfiguration, some other times there's no way around it (e.g. injected wallet plugins).

This PR attempts to remove the usage of instanceof from all flows were inputs might come from different bundles:

Test Plan

CI, as well as manually testing Wapal that is currently unable to integrate with AptosConnect because of the above problem.