Skip to content

v1.6.0 UX & Tips Relase

Pre-release
Pre-release

Choose a tag to compare

@zfedoran zfedoran released this 09 Apr 18:17
· 19 commits to main since this release

What's Changed

This release primarily adds the ability to tip Code Wallet users that have linked their X/Twitter account with a Code Wallet. The scannable codes are persistent and can be printed out on a physical card. They are not unique to each invoke.

Note: This release is part of a larger release and is still under internal testing/development on the mobile app and sequencer sides.

Tip Card Example

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

// Note: the user must have a Code account and have their X account
// connected. The Code Wallet app will show an error message if the user
// does not have a connected X account.

const username = 'elonmusk';
const name = 'x'; // or 'twitter' (if you prefer)

const options = {
  mode: 'tip',
  platform: {
    username,
    name,
  }
}

const { button } = code.elements.create('button', options);

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

Page Flows

Additionally, this release adds the ability to create the Code Wallet card pages directly, without having to use a button. This allows you to create a custom button or interaction that takes the user directly to the card view.

To use this flow, simply replace:
const { button } = code.elements.create('button', options);

with this:
const { page } = code.elements.create('page', options);

Pull Requests

Full Changelog: v1.5.0...v1.6.0