Skip to content

Commit

Permalink
Last couple fixes for the refactor to integrate with masa
Browse files Browse the repository at this point in the history
  • Loading branch information
hide-on-bush-x committed Jul 4, 2023
2 parents 8006bb9 + 26f3dc4 commit 7270e35
Show file tree
Hide file tree
Showing 61 changed files with 1,402 additions and 1,158 deletions.
4 changes: 2 additions & 2 deletions .storybook/main.js
Expand Up @@ -7,11 +7,11 @@ module.exports = {
'@storybook/addon-links',
'@storybook/addon-essentials',
{
name: "@storybook/addon-styling",
name: '@storybook/addon-styling',
options: {
sass: {
// Require your preprocessor
implementation: require("sass"),
implementation: require('sass'),
},
},
},
Expand Down
131 changes: 128 additions & 3 deletions CHANGELOG.md
Expand Up @@ -4,15 +4,140 @@ All notable changes to this project will be documented in this file. Dates are d

Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

#### [v2.4.14](https://github.com/masa-finance/masa-react/compare/v2.4.13...v2.4.14)
#### [v2.5.4](https://github.com/masa-finance/masa-react/compare/v2.5.3...v2.5.4)

> 30 June 2023
- update packages [`a13498b`](https://github.com/masa-finance/masa-react/commit/a13498bcfd02d2ad242f9d6c53b4dc461fabafa2)

#### [v2.5.3](https://github.com/masa-finance/masa-react/compare/v2.5.2...v2.5.3)

> 30 June 2023
- set default chain to forced network [`65afc8c`](https://github.com/masa-finance/masa-react/commit/65afc8cf6422b7f936847f118e1c569f6507d4a2)

#### [v2.5.2](https://github.com/masa-finance/masa-react/compare/v2.5.1...v2.5.2)

> 30 June 2023
- update docs [`f1d3693`](https://github.com/masa-finance/masa-react/commit/f1d36937e5be812e2b77173cf162633f4f8a5c78)
- try to type some things [`ba90bd5`](https://github.com/masa-finance/masa-react/commit/ba90bd557a840111579aecb2f683030fd116a5a5)

#### [v2.5.1](https://github.com/masa-finance/masa-react/compare/v2.5.0...v2.5.1)

> 29 June 2023
- Add WalletConnectV2 [`#228`](https://github.com/masa-finance/masa-react/pull/228)
- update docs [`0d4d6d8`](https://github.com/masa-finance/masa-react/commit/0d4d6d868e7789532ef50a719867018e50f7da35)
- update masa-sdk [`57db39e`](https://github.com/masa-finance/masa-react/commit/57db39e229347cb6b27d58fbffba1c43f493c297)

#### [v2.5.0](https://github.com/masa-finance/masa-react/compare/v2.4.18...v2.5.0)

> 29 June 2023
- build(deps): bump @tanstack/query-sync-storage-persister from 4.29.15 to 4.29.17 [`#226`](https://github.com/masa-finance/masa-react/pull/226)
- build(deps-dev): bump @storybook/addon-mdx-gfm from 7.0.22 to 7.0.23 [`#224`](https://github.com/masa-finance/masa-react/pull/224)
- build(deps-dev): bump @typescript-eslint/parser from 5.60.0 to 5.60.1 [`#227`](https://github.com/masa-finance/masa-react/pull/227)
- feat: update wagmi & rainbowkit [`92e8eab`](https://github.com/masa-finance/masa-react/commit/92e8eab415b5371a0412b1c03b75916e0f7c9149)
- pin some package versions [`2568c74`](https://github.com/masa-finance/masa-react/commit/2568c7480ee3507861deef9787a8905527326588)
- fix: type errors for new wagmi version [`7ddc9e8`](https://github.com/masa-finance/masa-react/commit/7ddc9e85e1cbb59518f71567bc45c6b5836d9941)

#### [v2.4.18](https://github.com/masa-finance/masa-react/compare/v2.4.18-alpha-3...v2.4.18)

> 26 June 2023
#### [v2.4.18-alpha-3](https://github.com/masa-finance/masa-react/compare/v2.4.18-alpha-2...v2.4.18-alpha-3)

> 27 June 2023
- build(deps-dev): bump @storybook/addon-mdx-gfm from 7.0.22 to 7.0.23 [`#224`](https://github.com/masa-finance/masa-react/pull/224)
- build(deps-dev): bump @typescript-eslint/parser from 5.60.0 to 5.60.1 [`#227`](https://github.com/masa-finance/masa-react/pull/227)
- feat: masa soulname modal rework [`5e7b96e`](https://github.com/masa-finance/masa-react/commit/5e7b96ed66db4150b0c699d0f42d81f138c5e321)
- fix: lint [`156bf83`](https://github.com/masa-finance/masa-react/commit/156bf83054b3c3daaded7bd767346c538e04c5bd)

#### [v2.4.18-alpha-2](https://github.com/masa-finance/masa-react/compare/v2.4.18-alpha...v2.4.18-alpha-2)

> 27 June 2023
- feat: revert network changes [`60e6ffe`](https://github.com/masa-finance/masa-react/commit/60e6ffe10bc4e8fab600aa057a142ce409a0320b)

#### [v2.4.18-alpha](https://github.com/masa-finance/masa-react/compare/v2.4.17...v2.4.18-alpha)

> 26 June 2023
- fix useNetwork: used activeChain.id instead of name to get the supported network information [`ffb084b`](https://github.com/masa-finance/masa-react/commit/ffb084bc2bdaf0e7613960220c221c15edf1de90)

#### [v2.4.17](https://github.com/masa-finance/masa-react/compare/v2.4.16...v2.4.17)

> 23 June 2023
- chore: add code comments [`4e2fbc6`](https://github.com/masa-finance/masa-react/commit/4e2fbc6b496db70cae46251e8cb30415602f5045)

#### [v2.4.16](https://github.com/masa-finance/masa-react/compare/v2.4.15...v2.4.16)

> 23 June 2023
- feat: update soulname purchase, integrate refactor more [`4fdaea6`](https://github.com/masa-finance/masa-react/commit/4fdaea6c49516c1fb8e65e9057081dfd0f3de131)

#### [v2.4.15](https://github.com/masa-finance/masa-react/compare/v2.4.14...v2.4.15)

> 23 June 2023
- Refactor masa state [`#187`](https://github.com/masa-finance/masa-react/pull/187)
- build(deps-dev): bump storybook from 7.0.20 to 7.0.22 [`#217`](https://github.com/masa-finance/masa-react/pull/217)
- feat: correct ethereum switching, masa object creation [`685dcd5`](https://github.com/masa-finance/masa-react/commit/685dcd551dff45568302676390fbb5320f8d6387)
- feat: masa state refacotr wip [`881083f`](https://github.com/masa-finance/masa-react/commit/881083f9663053542d080dc7261f451c73b33b42)
- feat: refactor masa session, update other entities [`4552260`](https://github.com/masa-finance/masa-react/commit/4552260c65c8db877a58f908f2ac731142ca9cd1)

#### [v2.4.14](https://github.com/masa-finance/masa-react/compare/v2.4.14-alpha-9...v2.4.14)

> 20 June 2023
#### [v2.4.14-alpha-9](https://github.com/masa-finance/masa-react/compare/v2.4.14-alpha-8...v2.4.14-alpha-9)

> 29 June 2023
- use wallet connect v2 [`bb868d7`](https://github.com/masa-finance/masa-react/commit/bb868d76c20af66dd39455b0d89bda2f9b1d244c)

#### [v2.4.14-alpha-8](https://github.com/masa-finance/masa-react/compare/v2.4.14-alpha-7...v2.4.14-alpha-8)

> 29 June 2023
- build(deps): bump @tanstack/query-sync-storage-persister from 4.29.15 to 4.29.17 [`#226`](https://github.com/masa-finance/masa-react/pull/226)
- pin some package versions [`2568c74`](https://github.com/masa-finance/masa-react/commit/2568c7480ee3507861deef9787a8905527326588)
- build(deps): bump @tanstack/query-sync-storage-persister [`8ca50bb`](https://github.com/masa-finance/masa-react/commit/8ca50bb347f93fb73b7fa7793c386759e3173f7d)

#### [v2.4.14-alpha-7](https://github.com/masa-finance/masa-react/compare/v2.4.14-alpha-6...v2.4.14-alpha-7)

> 28 June 2023
- feat: valora fix [`09ed14a`](https://github.com/masa-finance/masa-react/commit/09ed14a028a546d6531a8635b6877df7e228e256)

#### [v2.4.14-alpha-6](https://github.com/masa-finance/masa-react/compare/v2.4.14-alpha-4...v2.4.14-alpha-6)

> 28 June 2023
- fix: lint [`c97ac25`](https://github.com/masa-finance/masa-react/commit/c97ac25b3b2d62dcefb88b403f7c0124ffe93da7)

#### [v2.4.14-alpha-4](https://github.com/masa-finance/masa-react/compare/v2.4.14-alpha-10...v2.4.14-alpha-4)

> 27 June 2023
#### [v2.4.14-alpha-10](https://github.com/masa-finance/masa-react/compare/v2.4.13...v2.4.14-alpha-10)

> 29 June 2023
- build(deps): bump @tanstack/query-sync-storage-persister from 4.29.15 to 4.29.17 [`#226`](https://github.com/masa-finance/masa-react/pull/226)
- build(deps-dev): bump @storybook/addon-mdx-gfm from 7.0.22 to 7.0.23 [`#224`](https://github.com/masa-finance/masa-react/pull/224)
- build(deps-dev): bump @typescript-eslint/parser from 5.60.0 to 5.60.1 [`#227`](https://github.com/masa-finance/masa-react/pull/227)
- Refactor masa state [`#187`](https://github.com/masa-finance/masa-react/pull/187)
- build(deps-dev): bump storybook from 7.0.20 to 7.0.22 [`#217`](https://github.com/masa-finance/masa-react/pull/217)
- build(deps-dev): bump @storybook/addons from 7.0.17 to 7.0.22 [`#219`](https://github.com/masa-finance/masa-react/pull/219)
- build(deps-dev): bump @storybook/addon-links from 7.0.17 to 7.0.22 [`#221`](https://github.com/masa-finance/masa-react/pull/221)
- build(deps-dev): bump sass-loader from 13.3.0 to 13.3.2 [`#220`](https://github.com/masa-finance/masa-react/pull/220)
- update docs [`8a38099`](https://github.com/masa-finance/masa-react/commit/8a38099a8c3408d050d404eab2ddfe63c446ced2)
- update masa sdk [`d667d1d`](https://github.com/masa-finance/masa-react/commit/d667d1d9e6e2b5a32e4677ff83a401c786f73691)
- feat: correct ethereum switching, masa object creation [`685dcd5`](https://github.com/masa-finance/masa-react/commit/685dcd551dff45568302676390fbb5320f8d6387)
- feat: update wagmi & rainbowkit [`92e8eab`](https://github.com/masa-finance/masa-react/commit/92e8eab415b5371a0412b1c03b75916e0f7c9149)
- feat: masa state refacotr wip [`881083f`](https://github.com/masa-finance/masa-react/commit/881083f9663053542d080dc7261f451c73b33b42)

#### [v2.4.13](https://github.com/masa-finance/masa-react/compare/v2.4.12...v2.4.13)

Expand Down
2 changes: 1 addition & 1 deletion docs/enums/SoulNameErrorCodes.md
@@ -1,5 +1,5 @@
[# Masa React
- v2.4.14](../README.md) / [Exports](../modules.md) / SoulNameErrorCodes
- v2.5.4](../README.md) / [Exports](../modules.md) / SoulNameErrorCodes

# Enumeration: SoulNameErrorCodes

Expand Down
2 changes: 1 addition & 1 deletion docs/interfaces/ArweaveConfig.md
@@ -1,5 +1,5 @@
[# Masa React
- v2.4.14](../README.md) / [Exports](../modules.md) / ArweaveConfig
- v2.5.4](../README.md) / [Exports](../modules.md) / ArweaveConfig

# Interface: ArweaveConfig

Expand Down
2 changes: 1 addition & 1 deletion docs/interfaces/MasaContextProviderProps.md
@@ -1,5 +1,5 @@
[# Masa React
- v2.4.14](../README.md) / [Exports](../modules.md) / MasaContextProviderProps
- v2.5.4](../README.md) / [Exports](../modules.md) / MasaContextProviderProps

# Interface: MasaContextProviderProps

Expand Down
2 changes: 1 addition & 1 deletion docs/interfaces/MasaShape.md
@@ -1,5 +1,5 @@
[# Masa React
- v2.4.14](../README.md) / [Exports](../modules.md) / MasaShape
- v2.5.4](../README.md) / [Exports](../modules.md) / MasaShape

# Interface: MasaShape

Expand Down
2 changes: 1 addition & 1 deletion docs/interfaces/ModalProps.md
@@ -1,5 +1,5 @@
[# Masa React
- v2.4.14](../README.md) / [Exports](../modules.md) / ModalProps
- v2.5.4](../README.md) / [Exports](../modules.md) / ModalProps

# Interface: ModalProps

Expand Down
2 changes: 1 addition & 1 deletion docs/interfaces/SpinnerProps.md
@@ -1,5 +1,5 @@
[# Masa React
- v2.4.14](../README.md) / [Exports](../modules.md) / SpinnerProps
- v2.5.4](../README.md) / [Exports](../modules.md) / SpinnerProps

# Interface: SpinnerProps

Expand Down
2 changes: 1 addition & 1 deletion docs/interfaces/WrapperModalProps.md
@@ -1,5 +1,5 @@
[# Masa React
- v2.4.14](../README.md) / [Exports](../modules.md) / WrapperModalProps
- v2.5.4](../README.md) / [Exports](../modules.md) / WrapperModalProps

# Interface: WrapperModalProps

Expand Down
4 changes: 2 additions & 2 deletions docs/modules.md
@@ -1,8 +1,8 @@
[# Masa React
- v2.4.14](README.md) / Exports
- v2.5.4](README.md) / Exports

# # Masa React
- v2.4.14
- v2.5.4

## Table of contents

Expand Down
39 changes: 19 additions & 20 deletions package.json
@@ -1,6 +1,6 @@
{
"name": "@masa-finance/masa-react",
"version": "2.4.18-alpha-3",
"version": "2.5.4",
"license": "MIT",
"main": "./dist/src/index.js",
"typings": "./dist/src/index.d.ts",
Expand Down Expand Up @@ -30,41 +30,39 @@
"test": "jest --passWithNoTests",
"doc": "typedoc"
},
"resolutions": {
"@storybook/react-docgen-typescript-plugin": "1.0.6--canary.9.cd77847.0"
},
"author": "hide-on-bush",
"dependencies": {
"@acusti/react-code-input": "^3.11.0",
"@babel/preset-typescript": "^7.21.5",
"@celo/rainbowkit-celo": "^0.11.2",
"@celo/rainbowkit-celo": "^1.0.2",
"@masa-finance/masa-contracts-identity": "^1.8.0",
"@masa-finance/masa-sdk": "^3.4.11",
"@masa-finance/masa-sdk": "^3.4.12",
"@metamask/providers": "^11.0.0",
"@rainbow-me/rainbowkit": "0.12.14",
"@rainbow-me/rainbowkit": "~0.12.16",
"@storybook/react": "^7.0.18",
"@tanstack/query-sync-storage-persister": "^4.29.17",
"@tanstack/react-query": "^4.28.0",
"@tanstack/react-query-persist-client": "^4.28.0",
"@wagmi/core": "0.10.11",
"@wagmi/core": "~0.10.16",
"@walletconnect/modal": "^2.5.9",
"babel-loader": "^9.1.2",
"babel-plugin-import": "^1.13.6",
"babel-preset-react-app": "^10.0.1",
"clean-webpack-plugin": "^4.0.0",
"cssnano": "^6.0.1",
"ethers": "^5",
"ethers": "~5.7.2",
"html-webpack-plugin": "^5.5.0",
"node-sass": "^9.0.0",
"normalize.css": "^8.0.1",
"react": "^18.2.0",
"react-phone-number-input": "^3.2.23",
"react-phone-number-input": "^3.2.25",
"react-query": "^3.39.3",
"react-spinners": "^0.13.8",
"react-use": "^17.4.0",
"react-use-pagination": "^2.0.1",
"reaptcha": "^1.12.1",
"rodal": "^2.0.0",
"storybook-addon-sass-postcss": "^0.1.3",
"wagmi": "0.12.13"
"wagmi": "~0.12.18"
},
"devDependencies": {
"@babel/core": "^7.22.1",
Expand All @@ -76,12 +74,12 @@
"@storybook/addon-info": "^5.3.21",
"@storybook/addon-links": "^7.0.22",
"@storybook/addon-mdx-gfm": "^7.0.23",
"@storybook/addon-styling": "^1.0.8",
"@storybook/addon-styling": "^1.3.2",
"@storybook/addons": "^7.0.22",
"@storybook/react": "^7.0.18",
"@storybook/components": "^7.0.23",
"@storybook/react-webpack5": "^7.0.20",
"@tanstack/eslint-plugin-query": "^4.29.9",
"@tanstack/react-query-devtools": "^4.29.12",
"@storybook/react-webpack5": "^7.0.20",
"@types/jest": "^29.5.2",
"@types/mocha": "^10.0.1",
"@types/node": "^20.1.5",
Expand Down Expand Up @@ -113,7 +111,7 @@
"https-browserify": "^1.0.0",
"husky": "^8.0.2",
"jest": "^29.5.0",
"lint-staged": "^13.2.2",
"lint-staged": "^13.2.3",
"mini-css-extract-plugin": "^2.7.6",
"node-polyfill-webpack-plugin": "^2.0.1",
"node-sass": "^9.0.0",
Expand All @@ -128,19 +126,20 @@
"sass-loader": "^13.3.2",
"size-limit": "^8.1.0",
"storybook": "^7.0.22",
"storybook-addon-sass-postcss": "^0.1.3",
"stream-browserify": "^3.0.0",
"stream-http": "^3.2.0",
"style-loader": "^3.3.3",
"terser-webpack-plugin": "^5.3.9",
"ts-jest": "^29.0.5",
"ts-loader": "^9.4.2",
"ts-jest": "^29.1.1",
"ts-loader": "^9.4.4",
"ts-node": "^10.9.1",
"tsconfig-paths-webpack-plugin": "^4.0.1",
"typedoc": "^0.24.8",
"typedoc-plugin-markdown": "^3.15.3",
"typescript": "^5.0.4",
"typescript": "^5.1.6",
"url": "^0.11.0",
"webpack": "^5.84.1",
"webpack": "^5.88.1",
"webpack-bundle-analyzer": "^4.8.0",
"webpack-cli": "^5.1.0",
"webpack-node-externals": "^3.0.0",
Expand Down
27 changes: 15 additions & 12 deletions src/components/input/input.tsx
@@ -1,17 +1,20 @@
import React from 'react';

interface InputProps extends React.HTMLProps<HTMLInputElement> {
label?: string;
required?: boolean;
}
export const Input = ({ label, required, className, ...rest }: InputProps) => {
return (
<div className="masa-input-container">
{label && (
<label className="masa-input-label">
{label} {required && '*'}
</label>
)}
<input className={`masa-input ${className}`} {...rest} />
</div>
);
};
export const Input = ({ label, required, className, ...rest }: InputProps) => (
<div className="masa-input-container">
{label && (
<label className="masa-input-label" htmlFor={`masa-input-${label}`}>
{label} {required && '*'}
</label>
)}
<input
className={`masa-input ${className}`}
{...rest}
id={`masa-input-${label}`}
/>
</div>
);
7 changes: 3 additions & 4 deletions src/components/masa-interface/interface-subflow.tsx
@@ -1,5 +1,6 @@
import { useMasa } from '../../provider';
import React, { useCallback, useMemo, useState } from 'react';
import { useMasa } from '../../provider';

export interface SubflowPage {
next: () => void;
back: () => void;
Expand All @@ -21,9 +22,7 @@ const Renderer = ({
}: {
Render: React.FunctionComponent<SubflowPage>;
params: SubflowPage;
}) => {
return <Render {...params} />;
};
}) => <Render {...params} />;

export const InterfaceSubflow = ({
pages,
Expand Down

0 comments on commit 7270e35

Please sign in to comment.