Skip to content

Commit b9314ce

Browse files
Merge pull request #304 from reown-com/develop
prep for 1.2.0
2 parents faa1a14 + 36d4636 commit b9314ce

File tree

99 files changed

+3758
-373
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

99 files changed

+3758
-373
lines changed

.changeset/cyan-melons-float.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
'@reown/appkit-scaffold-react-native': patch
3+
'@reown/appkit-ethers5-react-native': patch
4+
'@reown/appkit-common-react-native': patch
5+
'@reown/appkit-ethers-react-native': patch
6+
'@reown/appkit-wallet-react-native': patch
7+
'@reown/appkit-wagmi-react-native': patch
8+
'@reown/appkit-core-react-native': patch
9+
'@reown/appkit-ui-react-native': patch
10+
'@reown/appkit-auth-ethers-react-native': patch
11+
'@reown/appkit-auth-wagmi-react-native': patch
12+
'@reown/appkit-coinbase-ethers-react-native': patch
13+
'@reown/appkit-coinbase-wagmi-react-native': patch
14+
'@reown/appkit-scaffold-utils-react-native': patch
15+
'@reown/appkit-siwe-react-native': patch
16+
---
17+
18+
fix: set loading when account data is being synced in appkit-wagmi

.changeset/fair-ravens-shop.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
'@reown/appkit-scaffold-react-native': minor
3+
'@reown/appkit-ethers5-react-native': minor
4+
'@reown/appkit-common-react-native': minor
5+
'@reown/appkit-ethers-react-native': minor
6+
'@reown/appkit-wallet-react-native': minor
7+
'@reown/appkit-wagmi-react-native': minor
8+
'@reown/appkit-core-react-native': minor
9+
'@reown/appkit-ui-react-native': minor
10+
'@reown/appkit-auth-ethers-react-native': minor
11+
'@reown/appkit-auth-wagmi-react-native': minor
12+
'@reown/appkit-coinbase-ethers-react-native': minor
13+
'@reown/appkit-coinbase-wagmi-react-native': minor
14+
'@reown/appkit-scaffold-utils-react-native': minor
15+
'@reown/appkit-siwe-react-native': minor
16+
---
17+
18+
feat: swaps feature

.changeset/late-cycles-lick.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
'@reown/appkit-scaffold-react-native': minor
3+
'@reown/appkit-ethers5-react-native': minor
4+
'@reown/appkit-common-react-native': minor
5+
'@reown/appkit-ethers-react-native': minor
6+
'@reown/appkit-wallet-react-native': minor
7+
'@reown/appkit-wagmi-react-native': minor
8+
'@reown/appkit-core-react-native': minor
9+
'@reown/appkit-ui-react-native': minor
10+
'@reown/appkit-auth-ethers-react-native': minor
11+
'@reown/appkit-auth-wagmi-react-native': minor
12+
'@reown/appkit-coinbase-ethers-react-native': minor
13+
'@reown/appkit-coinbase-wagmi-react-native': minor
14+
'@reown/appkit-scaffold-utils-react-native': minor
15+
'@reown/appkit-siwe-react-native': minor
16+
---
17+
18+
feat: added ability to change themeMode and override accent color

.github/workflows/changesets.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,18 +32,17 @@ jobs:
3232
commit: 'chore: version packages'
3333
publish: yarn run changeset:publish
3434
version: yarn run changeset:version
35-
createGithubReleases: false
3635
env:
3736
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3837
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
3938

40-
- name: Create Github Release
41-
if: steps.changesets.outputs.published == 'true'
42-
env:
43-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
44-
run: |
45-
VERSION=$(node -pe "require('./package.json').version")
46-
gh release create "v$VERSION" --generate-notes --target main
39+
# - name: Create Github Release
40+
# if: steps.changesets.outputs.published == 'true'
41+
# env:
42+
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
43+
# run: |
44+
# VERSION=$(node -pe "require('./package.json').version")
45+
# gh release create "v$VERSION" --generate-notes --target main
4746

4847
- name: Publish NPM pre-release
4948
if: steps.changesets.outputs.published != 'true'

apps/native/App.tsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import {
1515
} from '@reown/appkit-wagmi-react-native';
1616

1717
import { authConnector } from '@reown/appkit-auth-wagmi-react-native';
18+
import { Text } from '@reown/appkit-ui-react-native';
1819

1920
import { siweConfig } from './src/utils/SiweUtils';
2021

@@ -76,7 +77,8 @@ createAppKit({
7677
features: {
7778
email: true,
7879
socials: ['x', 'discord', 'apple'],
79-
emailShowWallets: true
80+
emailShowWallets: true,
81+
swaps: true
8082
}
8183
});
8284

@@ -88,6 +90,9 @@ export default function Native() {
8890
<QueryClientProvider client={queryClient}>
8991
<SafeAreaView style={[styles.container, isDarkMode && styles.dark]}>
9092
<StatusBar style="auto" />
93+
<Text variant="medium-title-600" style={styles.title}>
94+
AppKit for React Native
95+
</Text>
9196
<AppKitButton
9297
connectStyle={styles.button}
9398
accountStyle={styles.button}
@@ -121,6 +126,9 @@ const styles = StyleSheet.create({
121126
text: {
122127
marginBottom: 20
123128
},
129+
title: {
130+
marginBottom: 30
131+
},
124132
button: {
125133
marginVertical: 6
126134
}

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,9 @@
3131
"test": "turbo run test --parallel",
3232
"clean": "turbo clean && rm -rf node_modules && watchman watch-del-all",
3333
"format": "prettier --write \"**/*.{ts,tsx,js,jsx,json,md}\" --ignore-path .gitignore",
34-
"changeset:prepublish": "yarn run clean; yarn install; yarn version:update; yarn run lint && yarn run prettier; yarn run build; yarn run test;",
35-
"changeset:publish": "yarn run changeset:prepublish; yarn run changeset publish --no-git-tag",
34+
"playwright:test": "cd apps/native && yarn playwright:test",
35+
"changeset:prepublish": "yarn run clean; yarn install; yarn version:update; yarn run lint && yarn run prettier; yarn run build; yarn run test",
36+
"changeset:publish": "yarn run changeset:prepublish; yarn run changeset publish",
3637
"changeset:version": "changeset version; yarn run version:update; yarn install --refresh-lockfile",
3738
"version:update": "./scripts/bump-version.sh"
3839
},

packages/common/babel.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
presets: ['module:metro-react-native-babel-preset']
3+
};

packages/common/jest.config.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
const commonConfig = {
2+
...require('../../jest.config'),
3+
setupFilesAfterEnv: ['../../jest-setup.ts']
4+
};
5+
module.exports = commonConfig;
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import { ConstantsUtil, NamesUtil } from '../index';
2+
3+
describe('NamesUtil', () => {
4+
describe('isReownName', () => {
5+
test('returns true for names ending with legacy suffix', () => {
6+
const legacyName = `testname${ConstantsUtil.WC_NAME_SUFFIX_LEGACY}`;
7+
expect(NamesUtil.isReownName(legacyName)).toBe(true);
8+
});
9+
10+
test('returns true for names ending with current suffix', () => {
11+
const currentName = `testname${ConstantsUtil.WC_NAME_SUFFIX}`;
12+
expect(NamesUtil.isReownName(currentName)).toBe(true);
13+
});
14+
15+
test('returns false for names not ending with either suffix', () => {
16+
expect(NamesUtil.isReownName('testname')).toBe(false);
17+
expect(NamesUtil.isReownName('testname.com')).toBe(false);
18+
});
19+
20+
test('returns false for empty string', () => {
21+
expect(NamesUtil.isReownName('')).toBe(false);
22+
});
23+
});
24+
});
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
import { NumberUtil } from '../utils/NumberUtil';
2+
3+
// -- Tests --------------------------------------------------------------------
4+
describe('NumberUtil', () => {
5+
it('should return isGreaterThan as expected', () => {
6+
const isGreaterThan = NumberUtil.bigNumber('6.348').isGreaterThan('0');
7+
expect(isGreaterThan).toBe(true);
8+
});
9+
});
10+
11+
describe('NumberUtil.parseLocalStringToNumber', () => {
12+
it('should return 0 when value is undefined', () => {
13+
const result = NumberUtil.parseLocalStringToNumber(undefined);
14+
expect(result).toBe(0);
15+
});
16+
17+
it('should return the number when value is a string', () => {
18+
const result = NumberUtil.parseLocalStringToNumber('123.45');
19+
expect(result).toBe(123.45);
20+
});
21+
22+
it('should return the number when value is a string with a lot of decimals', () => {
23+
const result = NumberUtil.parseLocalStringToNumber('123.4567890123456789');
24+
expect(result).toBe(123.4567890123456789);
25+
});
26+
27+
it('should return the number when value is a string with zero and a lot of decimals', () => {
28+
const result = NumberUtil.parseLocalStringToNumber('0.000000000000000001');
29+
expect(result).toBe(0.000000000000000001);
30+
});
31+
32+
it('should return the number when value is a string with a negative sign', () => {
33+
const result = NumberUtil.parseLocalStringToNumber('-123.45');
34+
expect(result).toBe(-123.45);
35+
});
36+
37+
it('should return the number when value is a string with commas', () => {
38+
const result = NumberUtil.parseLocalStringToNumber('123,456.78');
39+
expect(result).toBe(123456.78);
40+
});
41+
42+
it('should return the number when value is a string with a lot of commas', () => {
43+
const result = NumberUtil.parseLocalStringToNumber('123,456,789.123,456,789');
44+
expect(result).toBe(123456789.123456789);
45+
});
46+
});

0 commit comments

Comments
 (0)