Skip to content

v1.5.0 UX & Fees Feature Release

Latest
Compare
Choose a tag to compare
@zfedoran zfedoran released this 29 Feb 20:26
· 32 commits to main since this release
768bbc2

What's Changed

Simplified UI

This release overhauls the UI elements. In general, less text is used to reduce cognitive load.

image

More Packages

Additionally, many quality of life improvements were made by splitting up the larger packages into smaller ones. This should help improve the packages going forward, as well as make it easier for contributors to get started.

This release includes the following new packages:

Note: the @code-sdk/library package has been deprecated.

Payment Fees

Beyond this, merchant fees have been added. This means you can now take a basis point cut from a payment. Simply add a fee section.

For example,

import code from 'https://js.getcode.com/v1';

const { button } = code.elements.create('button', {
  currency: 'usd',
  destination: '...',
  amount: 0.25,
  fees: [
    {
      destination: `E8otxw1CVX9bfyddKu3ZB3BVLa4VVF9J7CTPdnUwT9jR`,
      basisPoints: 1000, // take a 10% cut, 2.5 cents in this case
    }
  ],
});

button.mount('#button-container');

Pull requests

Full Changelog: v0.1.4.3...v1.5.0