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 Transaction Details Page #100

Merged
merged 3 commits into from
Dec 8, 2021
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,4 @@ yarn-debug.log*
yarn-error.log*
.idea/
end2end/logs
screenlog.*
17 changes: 7 additions & 10 deletions end2end/TransactionDetails_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,11 @@ function seeUserTxnRowHeaders (I) {
I.see('Version ID')
I.see('Status')
I.see('Transaction Type')
I.see('From')
I.see('To')
I.see('From')
I.see('Amount')
I.see('Expiration')
I.see('Currency')
I.see('Metadata')
I.see('Metadata Signature')
I.see('Currency Code')
I.see('Sequence Number')
I.see('Gas Used')
I.see('Gas Unit Price')
Expand All @@ -22,20 +20,19 @@ function seeUserTxnRowHeaders (I) {

function seeUserTxnRowData (I) {
I.see('64117651')
I.see('executed')
I.see('user')
I.see('Executed successfully')
I.see('user_transaction')
I.see('e4d382572c1286984aecfae682db0370')
I.see('ed53d2c05bc4ff33d15a744f35010026')
I.see('1')
I.see('1616166081')
I.see('XUS')
I.see('0x1::XUS::XUS')
I.see('3653')
I.see('511')
I.see('0')
I.see('1000000')
I.see('7b1568a5d5e14be898fa56f3bdb460b8bc4de9bf1267e1cc7982338d51cc1b37')
I.see('ec841ca48bfef97c4c867c5e18483730b6075820050baeef5c8ac0cdc3e28eb7dd6a16f7ab5b52f2ce16478b5b57d751ea3a351b71cc02973188dc8b4e086b03')
I.see('04ea43107fafc12adcd09f6c68d63e194675d0ce843a7faf7cceb6c813db9d9a')
I.see('0x7b1568a5d5e14be898fa56f3bdb460b8bc4de9bf1267e1cc7982338d51cc1b37')
I.see('0xec841ca48bfef97c4c867c5e18483730b6075820050baeef5c8ac0cdc3e28eb7dd6a16f7ab5b52f2ce16478b5b57d751ea3a351b71cc02973188dc8b4e086b03')
}

function seeUnsupportedTransactionCard(I) {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"request": {
"method": "GET",
"url": "/blockchainRestApi/transactions/321960031"
},
"response": {
"status": 200,
"headers": {
"Access-Control-Allow-Origin": "*",
"Access-Control-Allow-Methods": "*",
"Access-Control-Allow-Headers": "*"
},
"jsonBody": {
"type": "block_metadata_transaction",
"version": "321960031",
"hash": "0xc5c969761211f65d41a8a747f66e45309a45e71c03ba915412baabfaea247cea",
"state_root_hash": "0x0d875b3cb1b37e9be197a0c9f38371bb59a442e81c65a0935ebeb12a84fd66c5",
"event_root_hash": "0x453942b90a424d40832b3f75acef170eac9026fd03a0baf8b1ed69517f4e093e",
"gas_used": "100000000",
"success": true,
"vm_status": "Executed successfully",
"id": "0xacc2e890f996e8d710a56aeddf01e5797f2366616a9d0d349ebc8d784c5c2880",
"round": "17127",
"previous_block_votes": [
"0x3aaee9f2794e4d2863f58e5ba0434f",
"0x1b8a315ecb5da3bf65324e5c98d7c5d2",
"0x1ee66634a9d307e598a9001c70350f57",
"0x3b4f0b8a914678fd087935cf01b7cc78",
"0x3ec43d8df8e6a8d192cb7db7d88ceaaa",
"0x49e14093c12d40d8fe9ac2af30bc6fc4",
"0x63e721fbc1999c3c721caedfea9ab00d",
"0x76e8f447ac03d161366b1c95e3230aa9",
"0x8dba6983cdfdd9577a0220264a4c52ab",
"0x92d4d3baf2716b09d4f863176dc77980",
"0x94511281e2e59b01c36da19fd56e067a",
"0xab257bf8e91862d2d41d0629d9618800",
"0xb68cf702c43aff3d9ada6a88041bd13f",
"0xc0a38f4b8de6ef37e84402873b33feed",
"0xc8dacb8b498a61bddfb9cccc2ddc8ba5",
"0xed5d9b97d7f1ca058bcfc035a072e887"
],
"proposer": "0xed5d9b97d7f1ca058bcfc035a072e887",
"timestamp": "1634926726032337"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
{
"request": {
"method": "GET",
"url": "/blockchainRestApi/transactions/64117651"
},
"response": {
"status": 200,
"headers": {
"Access-Control-Allow-Origin": "*",
"Access-Control-Allow-Methods": "*",
"Access-Control-Allow-Headers": "*"
},
"jsonBody": {
"type": "user_transaction",
"version": "64117651",
"hash": "0xa145e8faefa6ab14fb379fb6960eee6e3e9aefca43c71d6368e366325026e7da",
"state_root_hash": "0xb1ecd2aaa48f89aee9742b8d7ee54de965e76d7f98a9fc62d2c7e82efb0a1156",
"event_root_hash": "0xccd9500189582dd8126fea77926267b58064eae0462538aa3964e5edb42a5d8a",
"gas_used": "511",
"success": true,
"vm_status": "Executed successfully",
"sender": "0xe4d382572c1286984aecfae682db0370",
"sequence_number": "3653",
"max_gas_amount": "1000000",
"gas_unit_price": "0",
"gas_currency_code": "XUS",
"expiration_timestamp_secs": "1616166081",
"payload": {
"type": "script_payload",
"code": {
"bytecode": "0xa11ceb0b010000000701000202020403061004160205181d0735600895011000000001010000020001000003020301010004010300010501060c0108000506080005030a020a020005060c05030a020a020109000b4469656d4163636f756e741257697468647261774361706162696c6974791b657874726163745f77697468647261775f6361706162696c697479087061795f66726f6d1b726573746f72655f77697468647261775f6361706162696c69747900000000000000000000000000000001010104010c0b0011000c050e050a010a020b030b0438000b05110202",
"abi": {
"name": "main",
"visibility": "script",
"generic_type_params": [
{
"constraints": [
"store"
]
}
],
"params": [
"&signer",
"address",
"u64",
"vector<u8>",
"vector<u8>"
],
"return": []
}
},
"type_arguments": [
"0x1::XUS::XUS"
],
"arguments": [
"0xed53d2c05bc4ff33d15a744f35010026",
"1",
"0x",
"0x"
]
},
"signature": {
"type": "ed25519_signature",
"public_key": "0x7b1568a5d5e14be898fa56f3bdb460b8bc4de9bf1267e1cc7982338d51cc1b37",
"signature": "0xec841ca48bfef97c4c867c5e18483730b6075820050baeef5c8ac0cdc3e28eb7dd6a16f7ab5b52f2ce16478b5b57d751ea3a351b71cc02973188dc8b4e086b03"
},
"events": [
{
"key": "0x0100000000000000e4d382572c1286984aecfae682db0370",
"sequence_number": "3653",
"type": "0x1::DiemAccount::SentPaymentEvent",
"data": {
"amount": "1",
"currency_code": "0x585553",
"metadata": "0x",
"payee": "0xed53d2c05bc4ff33d15a744f35010026"
}
},
{
"key": "0x0000000000000000ed53d2c05bc4ff33d15a744f35010026",
"sequence_number": "3476",
"type": "0x1::DiemAccount::ReceivedPaymentEvent",
"data": {
"amount": "1",
"currency_code": "0x585553",
"metadata": "0x",
"payer": "0xe4d382572c1286984aecfae682db0370"
}
}
]
}
}
}
3 changes: 1 addition & 2 deletions src/MainWrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import {
NavDropdown,
} from 'react-bootstrap'
import logo from '../static/logo.svg'
import Config from './config.json'
import { Link } from 'react-router-dom'
interface MainWrapperProps {
children?: ReactChild
Expand Down Expand Up @@ -38,7 +37,7 @@ function MainWrapper(props: MainWrapperProps) {
<Nav className="me-auto align-items-center">
<DropdownButton
id="dropdown-basic-button"
title={`${Config.DIEMX_CHAIN} ${Config.DIEMX_ENV}`}
title={'DPN Dev'}
className="d-inline"
size="sm"
variant="secondary"
Expand Down
Loading