Skip to content

Commit

Permalink
fix: fix fallback chain list logic
Browse files Browse the repository at this point in the history
  • Loading branch information
davisshaver committed Dec 17, 2024
1 parent 4fa4b9a commit 41e404f
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 154 deletions.
4 changes: 2 additions & 2 deletions farcaster-wp.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* Plugin Name: Farcaster WP
* Plugin URI: https://farcaster-wp.davisshaver.com/
* Description: Farcaster WP connects your WordPress site to Farcaster.
* Version: 0.0.32
* Version: 0.0.33
* Author: Davis Shaver
* Author URI: https://davisshaver.com/
* License: GPL v2 or later
Expand All @@ -22,7 +22,7 @@

defined( 'ABSPATH' ) || exit;

define( 'FARCASTER_WP_VERSION', '0.0.32' );
define( 'FARCASTER_WP_VERSION', '0.0.33' );

define( 'FARCASTER_WP_API_NAMESPACE', 'farcaster-wp/v1' );
define( 'FARCASTER_WP_API_URL', get_site_url() . '/wp-json/' . FARCASTER_WP_API_NAMESPACE );
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "farcaster-wp",
"version": "0.0.32",
"version": "0.0.33",
"description": "Farcaster WP connects your WordPress site to Farcaster.",
"author": "Davis Shaver",
"license": "GPL-2.0-or-later",
Expand Down
2 changes: 1 addition & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Farcaster WP makes it easy to setup [Farcaster frames](https://docs.farcaster.xy

== Changelog ==

= 0.0.32 =
= 0.0.33 =
* Initial plugin release to WordPress.org

== Screenshots =
Expand Down
9 changes: 3 additions & 6 deletions src/components/WagmiProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,9 @@ const chainMap = {
zora,
} as { [ key: string ]: Chain };

const chainList = window.farcasterWP?.tippingChains || [
'optimism',
'base',
'mainnet',
'zora',
];
const chainList = window.farcasterWP?.tippingChains.length
? window.farcasterWP?.tippingChains
: [ 'optimism', 'base', 'mainnet', 'zora' ];

const [ firstChain, ...otherChains ] = chainList.reduce( ( acc, chain ) => {
if ( chainMap[ chain ] ) {
Expand Down
144 changes: 0 additions & 144 deletions src/utils/connector.ts

This file was deleted.

0 comments on commit 41e404f

Please sign in to comment.