GalaChain / GalaChain/sdk

Review, Refactor, and Improve Token Swap implementation

Open
#470 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
138
Forks
44
Avg merge
1d 16h
Merged PRs (30d)
22

Description

An old token swap implementation was migrated from an internal codebase to the public sdk for broader consumption in pull request https://github.com/GalaChain/sdk/pull/468.

The scope of this issue is to take the migrated code, finish updating it to use more modern methods provided by the v2.x SDK, review it for potential security and refactoring improvements, and look for opportunities to share code with the recently drafted Token Sale feature (related issue: https://github.com/GalaChain/sdk/issues/443).

Open feedback left on the merged pull request https://github.com/GalaChain/sdk/pull/468 should be addressed in addition to the above higher level goals:

- fix, resolve, or delete old `todo` comments
- standardize use of `UserAlias`, `await resolveUserAlias()`, `UserAlias` in swap function params
- error handling updates - this code was written long before `ChainErrors` were standardized and provided in the SDK and there are several places where errors can be handling differently

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.