Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 Fix cannot update iscn without timestamp #255

Merged
merged 1 commit into from
Aug 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion likecoin/assets/js/admin-metabox/metabox.asset.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php return array(
'dependencies' => array(),
'version' => 'fb5d57ee5a1b3a94c07a',
'version' => '52988637c6cc94d5f64b',
);
2 changes: 1 addition & 1 deletion likecoin/assets/js/admin-metabox/metabox.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion likecoin/assets/js/sidebar/index.asset.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php return array(
'dependencies' => array( 'react', 'wp-api-fetch', 'wp-components', 'wp-data', 'wp-edit-post', 'wp-element', 'wp-i18n', 'wp-plugins', 'wp-wordcount' ),
'version' => 'fc2ec40825e2401de656',
'version' => 'cd6f88cb1cd5682ed03d',
);
2 changes: 1 addition & 1 deletion likecoin/assets/js/sidebar/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion likecoin/js/admin-metabox/metabox.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ async function onRefreshPublishStatus(e) {
iscnId,
isMattersPublished,
lastModifiedTime,
iscnTimestamp,
iscnTimestamp = 0,
} = lcPostInfo;
const res = await jQuery.ajax({
type: 'POST',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ function LikeCoinPluginDocumentSettingPanel(props) {
const postDate = useSelect((select) => select('core/editor').getEditedPostAttribute('modified_gmt'));
useEffect(() => {
setShowUpdateISCNButton(!!(isCurrentPostPublished
&& props.ISCNTimestamp
&& Date.parse(`${postDate}Z`) > props.ISCNTimestamp)); // force parsing as gmt;
&& Date.parse(`${postDate}Z`) > (props.ISCNTimestamp || 0))); // force parsing as gmt;
}, [isCurrentPostPublished, postDate, props.ISCNTimestamp]);
useEffect(() => setShowNFTButton(!!props.ISCNId), [props.ISCNId]);
useEffect(() => {
Expand Down
3 changes: 1 addition & 2 deletions likecoin/js/sidebar/src/pages/LikeCoinPluginSideBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,7 @@ function LikeCoinPluginSideBar(props) {
}, [isCurrentPostPublished, props.ISCNId]);
useEffect(() => {
setShowUpdateISCNButton(!!(isCurrentPostPublished
&& props.ISCNTimestamp
&& Date.parse(`${postDate}Z`) > props.ISCNTimestamp)); // force parsing as gmt
&& Date.parse(`${postDate}Z`) > (props.ISCNTimestamp || 0))); // force parsing as gmt
}, [isCurrentPostPublished, postDate, props.ISCNTimestamp]);
useEffect(() => setShowNFTButton(!!props.ISCNId), [props.ISCNId]);
useEffect(() => {
Expand Down