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: update boostagram ts type to numeric #189

Closed
wants to merge 1 commit into from
Closed
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
8 changes: 4 additions & 4 deletions pages/Transaction.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ type Boostagram = {
podcast: string;
url: string;
episode?: string;
itemID?: string;
ts?: string;
itemID?: number;
ts?: number;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what if it is a string?

those are sent from the podcast players and I don't think we make sure that it's the correct type.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, in the Hub we accept both types as it broke a while before as few podcast clients were mixing up string/number for such types, best to add support for both if we want to change this

message?: string;
sender_id: string;
sender_name: string;
Expand Down Expand Up @@ -186,8 +186,8 @@ function PodcastingInfo({ boost }: { boost: Boostagram }) {
{boost.action && (
<TransactionDetailRow title="Action" content={boost.action} />
)}
{boost.ts && (
<TransactionDetailRow title="Timestamp" content={boost.ts} />
{boost.ts !== undefined && (
<TransactionDetailRow title="Timestamp" content={boost.ts.toString()} />
)}
{boost.value_msat_total && (
<TransactionDetailRow
Expand Down
Loading