safe-core-sdk
safe-core-sdk copied to clipboard
Remove metadata from `safeVersion`
Context / issue
L2 Safe contract versions are returned with +L2
metadata from the gateway. (Circles also contains +Circles
metadata).
1.3.0+L2
is currently an invalid version. It won't allow usage of the SDK.
Proposed solution
Using semver
for version retrieval as it strips metadata.
Alternatives
Metadata is marked with +
by default. It can be remove manually:
const [noMetadataVersion] = safeVersion.split('+')