Skip to content

Commit c2e37dc

Browse files
committed
🐛 Fix undefined fields issue
1 parent d1eaaae commit c2e37dc

File tree

4 files changed

+25
-18
lines changed

4 files changed

+25
-18
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "wp-rainbow",
3-
"version": "0.3.0",
3+
"version": "0.3.1",
44
"description": "RainbowKit Login (Web3 Integration for Sign-In With Ethereum)",
55
"author": "Davis Shaver",
66
"license": "GPL-2.0-or-later",

readme.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Tags: WordPress, web3, SIWE, Ethereum, RainbowKit, Sign-In With Ethereum
44
Tested up to: 6.1
55
Requires at least: 5.9
66
Requires PHP: 7.0
7-
Stable tag: 0.3.0
7+
Stable tag: 0.3.1
88
License: GPLv2 or later
99
License URI: https://www.gnu.org/licenses/gpl-2.0.html
1010

@@ -57,6 +57,9 @@ Find reference implementations of all filters in [example plugin here](https://g
5757

5858
== Changelog ==
5959

60+
= 0.3.1 =
61+
* Bug fixes
62+
6063
= 0.3.0 =
6164
* Major refactor with new React-powered admin and additional token-gating functionality
6265

@@ -109,6 +112,6 @@ Find reference implementations of all filters in [example plugin here](https://g
109112
3. RainbowKit Login uses the Sign-In With Ethereum protocol
110113
4. RainbowKit Login uses the user's address as their username, and an ENS address if available as their display name
111114
5. RainbowKit Login includes a login block that can be customized
112-
6. RainbowKit Login can be with a variety of settings
115+
6. RainbowKit Login can be customized with a variety of settings
113116
7. RainbowKit Login can sync ENS text records to WordPress user profile fields
114117
8. RainbowKit Login can be used to apply specific roles to users based on ERC-1155 token ownership

src/settings.jsx

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -111,22 +111,26 @@ function WPRainbowSettings() {
111111
} ).then( ( allSettings ) => {
112112
const userAttributesMapping =
113113
allSettings?.wp_rainbow_field_user_attributes_mapping
114-
.split( '\n' )
115-
.map( ( line ) => {
116-
const [ key, value ] = line
117-
.split( ',' )
118-
.map( ( item ) => item.trim() );
119-
return { key, value };
120-
} );
114+
? allSettings?.wp_rainbow_field_user_attributes_mapping
115+
.split( '\n' )
116+
.map( ( line ) => {
117+
const [ key, value ] = line
118+
.split( ',' )
119+
.map( ( item ) => item.trim() );
120+
return { key, value };
121+
} )
122+
: [];
121123
const roleToIDMapping =
122124
allSettings?.wp_rainbow_role_to_id_mapping_field
123-
.split( '\n' )
124-
.map( ( line ) => {
125-
const [ key, value ] = line
126-
.split( ',' )
127-
.map( ( item ) => item.trim() );
128-
return { key, value };
129-
} );
125+
? allSettings?.wp_rainbow_role_to_id_mapping_field
126+
.split( '\n' )
127+
.map( ( line ) => {
128+
const [ key, value ] = line
129+
.split( ',' )
130+
.map( ( item ) => item.trim() );
131+
return { key, value };
132+
} )
133+
: [];
130134
setValue( 'roleToIDMapping', roleToIDMapping );
131135
setValue( 'userAttributesMapping', userAttributesMapping );
132136
const settings = Object.keys( allSettings ).reduce(

wp-rainbow.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* Plugin Name: RainbowKit Login (Web3 Integration for Sign-In With Ethereum)
1111
* Plugin URI: https://wp-rainbow.davisshaver.com/
1212
* Description: RainbowKit Login allows WordPress users to log in with Ethereum using the Sign-In With Ethereum standard, powered by RainbowKit.
13-
* Version: 0.3.0
13+
* Version: 0.3.1
1414
* Author: Davis Shaver
1515
* Author URI: https://davisshaver.com/
1616
* License: GPL v2 or later

0 commit comments

Comments
 (0)