|
|
@ -158,7 +158,9 @@ export function MessageSearch() { |
|
|
|
} |
|
|
|
} |
|
|
|
imgSrc={ShrugIcon} |
|
|
|
imgSrc={ShrugIcon} |
|
|
|
imgAlt="No results" |
|
|
|
imgAlt="No results" |
|
|
|
text="Sorry, no results found. Please try a different address or hash." |
|
|
|
text={`Sorry, no results found. Please try ${ |
|
|
|
|
|
|
|
hasInput ? 'a different address or hash' : 'again later' |
|
|
|
|
|
|
|
}.`}
|
|
|
|
imgWidth={110} |
|
|
|
imgWidth={110} |
|
|
|
/> |
|
|
|
/> |
|
|
|
{/* Search error state */} |
|
|
|
{/* Search error state */} |
|
|
@ -217,7 +219,7 @@ function getChainOptionList(): Array<{ value: string; display: string }> { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const latestMessagesQuery = ` |
|
|
|
const latestMessagesQuery = ` |
|
|
|
query MessageDetails { |
|
|
|
query LatestMessages { |
|
|
|
message(order_by: {timestamp: desc}, limit: 8) { |
|
|
|
message(order_by: {timestamp: desc}, limit: 8) { |
|
|
|
destination |
|
|
|
destination |
|
|
|
id |
|
|
|
id |
|
|
@ -241,18 +243,37 @@ query MessageDetails { |
|
|
|
} |
|
|
|
} |
|
|
|
}`;
|
|
|
|
}`;
|
|
|
|
|
|
|
|
|
|
|
|
// TODO
|
|
|
|
|
|
|
|
const searchMessagesQuery = ` |
|
|
|
const searchMessagesQuery = ` |
|
|
|
query searchMessages ($search: String!) { |
|
|
|
query SearchMessages ($search: bpchar!) { |
|
|
|
messages (search: $search, order_by: {origintimesent: desc}, limit: 8) { |
|
|
|
message( |
|
|
|
|
|
|
|
where: { |
|
|
|
|
|
|
|
_or: [ |
|
|
|
|
|
|
|
{sender: {_eq: $search}}, |
|
|
|
|
|
|
|
{recipient: {_eq: $search}}, |
|
|
|
|
|
|
|
{transaction: {hash: {_eq: $search}}}, |
|
|
|
|
|
|
|
{delivered_message: {transaction: {hash: {_eq: $search}}}}, |
|
|
|
|
|
|
|
] |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
order_by: {timestamp: desc}, |
|
|
|
|
|
|
|
limit: 40) { |
|
|
|
|
|
|
|
destination |
|
|
|
id |
|
|
|
id |
|
|
|
status |
|
|
|
origin |
|
|
|
sender |
|
|
|
|
|
|
|
recipient |
|
|
|
recipient |
|
|
|
body |
|
|
|
sender |
|
|
|
originchainid |
|
|
|
timestamp |
|
|
|
origintimesent |
|
|
|
delivered_message { |
|
|
|
destinationchainid |
|
|
|
id |
|
|
|
destinationtimesent |
|
|
|
tx_id |
|
|
|
|
|
|
|
inbox_address |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
message_states { |
|
|
|
|
|
|
|
block_height |
|
|
|
|
|
|
|
block_timestamp |
|
|
|
|
|
|
|
error_msg |
|
|
|
|
|
|
|
estimated_gas_cost |
|
|
|
|
|
|
|
id |
|
|
|
|
|
|
|
processable |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}`;
|
|
|
|
}`;
|
|
|
|