Skip to content

Commit

Permalink
Add redirectUrl widget parameter (#296)
Browse files Browse the repository at this point in the history
* Add redirectUrl widget parameter

* yarn upgrade
  • Loading branch information
steveviselli-cb authored Aug 1, 2024
1 parent b135212 commit a206100
Show file tree
Hide file tree
Showing 4 changed files with 234 additions and 253 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

All notable changes to this project will be documented in this file.

## [2.2.1] - 2024-08-01
- Added `redirectUrl` widget parameter

## [2.2.0] - 2024-06-11
- Added new `addresses` and `assets` initialization parameters to simplify `destinationWallets`
- Marked the `destinationWallets` initialization parameter as deprecated
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@coinbase/cbpay-js",
"repository": "https://github.com/coinbase/cbpay-js",
"version": "2.2.0",
"version": "2.2.1",
"license": "MIT",
"main": "dist/index.js",
"module": "dist/index.mjs",
Expand Down Expand Up @@ -33,6 +33,7 @@
"check-ci": "yarn run typecheck && yarn run lint && yarn run test"
},
"devDependencies": {
"@babel/core": "^7.0.0",
"@swc/core": "^1.2.237",
"@types/chrome": "0.0.168",
"@types/jest": "^27.0.2",
Expand All @@ -41,7 +42,6 @@
"@typescript-eslint/eslint-plugin-tslint": "^4.5.0",
"@typescript-eslint/parser": "4.26.1",
"babel-jest": "^27.5.1",
"@babel/core": "^7.0.0",
"eslint": "^6.8.0",
"eslint-config-prettier": "^8.4.0",
"eslint-plugin-jest": "^22.15.2",
Expand All @@ -50,9 +50,9 @@
"jest-chrome": "^0.7.2",
"prettier": "^2.5.1",
"ts-jest": "^27.1.3",
"tslint": "^6.0.0",
"tsup": "^6.2.2",
"typescript": "^4.4.4",
"tslint": "^6.0.0"
"typescript": "^4.4.4"
},
"engines": {
"node": ">= 14"
Expand Down
5 changes: 4 additions & 1 deletion src/types/onramp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ type BaseOnRampAppParams = {
* `addresses: { "0x1": ["base", "ethereum"] }, assets: ["USDC"]`
*
* The values in this list can either be asset symbols like BTC, ETH, or asset UUIDs that you can get from the Buy
* Options API {@link https://docs-cdp-onramp-preview.cbhq.net/onramp/docs/api-configurations/#buy-options}.
* Options API {@link https://docs.cdp.coinbase.com/onramp/docs/api-configurations/#buy-options}.
*/
assets?: string[];
/** The preset input amount as a crypto value. i.e. 0.1 ETH. This will be the initial default for all cryptocurrencies. */
Expand All @@ -89,6 +89,9 @@ type BaseOnRampAppParams = {
handlingRequestedUrls?: boolean;
/** ID used to link all user transactions created during the session. */
partnerUserId?: string;
/** A URL that the user will be automatically redirected to after a successful buy/send. The domain must match a domain
* on the domain allowlist in Coinbase Developer Platform (https://portal.cdp.coinbase.com/products/onramp). */
redirectUrl?: string;
};

export type OnRampAggregatorAppParams = {
Expand Down
Loading

0 comments on commit a206100

Please sign in to comment.