Skip to content

Commit

Permalink
➕ Switch to viem/siwe instead of simple-siwe
Browse files Browse the repository at this point in the history
  • Loading branch information
davisshaver committed May 22, 2024
1 parent 7505880 commit 0a7f021
Show file tree
Hide file tree
Showing 6 changed files with 4,058 additions and 4,566 deletions.
23 changes: 11 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wp-rainbow",
"version": "0.5.1",
"version": "0.5.2",
"description": "RainbowKit Login (Web3 Integration for Sign-In With Ethereum)",
"author": "Davis Shaver",
"license": "GPL-2.0-or-later",
Expand All @@ -22,25 +22,24 @@
},
"dependencies": {
"@rainbow-me/rainbowkit": "^2.0.7",
"@tanstack/react-query": "^5.36.0",
"@wordpress/block-editor": "^12.25.0",
"@wordpress/blocks": "^12.34.0",
"@wordpress/components": "^27.5.0",
"@wordpress/i18n": "^4.57.0",
"@tanstack/react-query": "^5.37.1",
"@wordpress/block-editor": "^12.26.0",
"@wordpress/blocks": "^12.35.0",
"@wordpress/components": "^27.6.0",
"@wordpress/i18n": "^4.58.0",
"classnames": "^2.5.1",
"process": "^0.11.10",
"prop-types": "^15.8.1",
"react-hook-form": "^7.51.4",
"react-hook-form": "^7.51.5",
"react-style-proptype": "^3.2.2",
"simple-siwe": "^0.1.4",
"util": "^0.12.5",
"viem": "^2.10.5",
"wagmi": "^2.8.7"
"viem": "^2.12.0",
"wagmi": "^2.9.4"
},
"devDependencies": {
"@babel/preset-react": "^7.24.1",
"@wordpress/eslint-plugin": "^18.0.0",
"@wordpress/scripts": "^27.8.0",
"@wordpress/eslint-plugin": "^18.1.0",
"@wordpress/scripts": "^27.9.0",
"css-loader": "^7.1.1",
"eslint-config-airbnb": "^19.0.4",
"style-loader": "^3.3.4",
Expand Down
3 changes: 3 additions & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ Find reference implementations of all filters in [example plugin here](https://g

== Changelog ==

= 0.5.2 =
* Switch from simple-siwe to viem/siwe

= 0.5.1 =
* Add default helper classname for button

Expand Down
6 changes: 3 additions & 3 deletions src/connect.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
useConnections,
} from 'wagmi';
import stylePropType from 'react-style-proptype';
import { prepareMessage } from 'simple-siwe';
import { createSiweMessage } from 'viem/siwe';
import PropTypes from 'prop-types';

const {
Expand Down Expand Up @@ -91,13 +91,13 @@ export function WPRainbowConnect( {
address,
chainId: chain.id,
domain: window.location.host,
issuedAt: new Date().toISOString(),
issuedAt: new Date(),
nonce,
statement: `Log In with Ethereum to ${ SITE_TITLE }`,
uri: window.location.origin,
version: '1',
};
const message = prepareMessage( siwePayload );
const message = createSiweMessage( siwePayload );
const attributes = {};
if ( ensName ) {
try {
Expand Down
2 changes: 1 addition & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ module.exports = {
...defaultConfig.plugins,
new webpack.ProvidePlugin( {
Buffer: [ 'buffer', 'Buffer' ],
process: 'process/browser',
process: 'process',
} ),
],
};
4 changes: 2 additions & 2 deletions wp-rainbow.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* Plugin Name: RainbowKit Login (Web3 Integration for Sign-In With Ethereum)
* Plugin URI: https://wp-rainbow.davisshaver.com/
* Description: RainbowKit Login allows WordPress users to log in with Ethereum using the Sign-In With Ethereum standard, powered by RainbowKit.
* Version: 0.5.1
* Version: 0.5.2
* Author: Davis Shaver
* Author URI: https://davisshaver.com/
* License: GPL v2 or later
Expand All @@ -27,7 +27,7 @@
/**
* WP Rainbow version number
*/
define( 'WP_RAINBOW_ASSETS_VERSION', '0.5.1' );
define( 'WP_RAINBOW_ASSETS_VERSION', '0.5.2' );

// Include the autoloader.
add_action(
Expand Down
Loading

0 comments on commit 0a7f021

Please sign in to comment.