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

Less deprecation #4677

Merged
merged 4 commits into from
Jan 5, 2024
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
4 changes: 2 additions & 2 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ PODS:
- disklet (0.5.2):
- React
- DoubleConversion (1.1.6)
- edge-core-js (1.13.1):
- edge-core-js (1.14.0):
- React-Core
- edge-currency-accountbased (2.18.8):
- React-Core
Expand Down Expand Up @@ -1266,7 +1266,7 @@ SPEC CHECKSUMS:
CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99
disklet: e7ed3e673ccad9d175a1675f9f3589ffbf69a5fd
DoubleConversion: 5189b271737e1565bdce30deb4a08d647e3f5f54
edge-core-js: 916fe4f3082117d39b1d54f2175ea7c4570c68d6
edge-core-js: e13715f9addd8f181edec0306169bc172f41065c
edge-currency-accountbased: 3b43dcfa1f97746bd537e48ef124b8929cdf2855
edge-exchange-plugins: 37158221eba37ad789238089f4ba2cb0ef8d24a4
edge-login-ui-rn: 7b78901664d8cb2dc41c76d1bd07c7e4cb77bd2a
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@
"deepmerge": "^4.3.1",
"detect-bundler": "^1.1.0",
"disklet": "^0.5.2",
"edge-core-js": "^1.13.1",
"edge-core-js": "^1.14.0",
"edge-currency-accountbased": "^2.18.8",
"edge-currency-monero": "^1.1.1",
"edge-currency-plugins": "^2.5.1",
Expand Down
35 changes: 21 additions & 14 deletions src/__tests__/actions/TransactionExportActions.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,15 @@ const edgeTxs: EdgeTransaction[] = [
metadata: {
name: 'Crazy Person',
category: 'Income:Mo Money',
notes: 'Hell yeah! Thanks for the fish <<&&>>',
amountFiat: 12000.45
exchangeAmount: { 'iso:USD': 12000.45 },
notes: 'Hell yeah! Thanks for the fish <<&&>>'
},
nativeAmount: '123000000',
networkFee: '1000',
ourReceiveAddresses: ['receiveaddress1', 'receiveaddress2'],
parentNetworkFee: '10002',
signedTx: '298t983y4t983y4t93y4g98oeshfgi4t89w394t',
tokenId: null,
txid: 'txid1',
walletId: ''
},
Expand All @@ -39,14 +40,15 @@ const edgeTxs: EdgeTransaction[] = [
metadata: {
name: 'Crazy Person 2',
category: 'Expense:Less Money',
notes: 'Hell yeah! Here\'s a fish"',
amountFiat: 36001.45
exchangeAmount: { 'iso:USD': 36001.45 },
notes: 'Hell yeah! Here\'s a fish"'
},
nativeAmount: '-321000000',
networkFee: '2000',
ourReceiveAddresses: ['receiveaddress3', 'receiveaddress4'],
parentNetworkFee: '20001',
signedTx: 'fiuwh34f98h3tiuheirgserg',
tokenId: null,
txid: 'txid2',
walletId: ''
},
Expand All @@ -59,14 +61,15 @@ const edgeTxs: EdgeTransaction[] = [
metadata: {
name: 'Transfer',
category: 'Transfer:Edge',
notes: '',
amountFiat: 36001.45
exchangeAmount: { 'iso:USD': 36001.45 },
notes: ''
},
nativeAmount: '-321000000',
networkFee: '2000',
ourReceiveAddresses: ['receiveaddress3', 'receiveaddress4'],
isSend: false,
signedTx: 'fiuwh34f98h3tiuheirgserg',
tokenId: null,
txid: 'txid3',
walletId: ''
},
Expand All @@ -79,14 +82,15 @@ const edgeTxs: EdgeTransaction[] = [
metadata: {
name: 'Transfer but actually income',
category: 'Transfer:Edge',
notes: '',
amountFiat: 36001.45
exchangeAmount: { 'iso:USD': 36001.45 },
notes: ''
},
nativeAmount: '321000000',
networkFee: '2000',
ourReceiveAddresses: ['receiveaddress3', 'receiveaddress4'],
isSend: true,
signedTx: 'fiuwh34f98h3tiuheirgserg',
tokenId: null,
txid: 'txid4',
walletId: ''
},
Expand All @@ -100,14 +104,15 @@ const edgeTxs: EdgeTransaction[] = [
metadata: {
name: 'Transfer but no fee',
category: 'Transfer:Edge',
notes: '',
amountFiat: 36001.45
exchangeAmount: { 'iso:USD': 36001.45 },
notes: ''
},
nativeAmount: '-321000000',
networkFee: '0',
ourReceiveAddresses: ['receiveaddress3', 'receiveaddress4'],
parentNetworkFee: '20001',
signedTx: 'fiuwh34f98h3tiuheirgserg',
tokenId: 'usdc_contract_address',
txid: 'txid4',
walletId: ''
},
Expand All @@ -120,14 +125,15 @@ const edgeTxs: EdgeTransaction[] = [
metadata: {
name: 'Transfer but no fiat amount',
category: 'Transfer:Edge',
notes: '',
amountFiat: 0
exchangeAmount: { 'iso:USD': 0 },
notes: ''
},
nativeAmount: '-321000000',
networkFee: '2000',
ourReceiveAddresses: ['receiveaddress3', 'receiveaddress4'],
isSend: true,
signedTx: 'fiuwh34f98h3tiuheirgserg',
tokenId: null,
txid: 'txid5',
walletId: ''
},
Expand All @@ -143,17 +149,18 @@ const edgeTxs: EdgeTransaction[] = [
networkFee: '2000',
ourReceiveAddresses: ['receiveaddress3', 'receiveaddress4'],
signedTx: 'fiuwh34f98h3tiuheirgserg',
tokenId: null,
txid: 'txid6',
walletId: ''
}
]

test('export CSV matches reference data', function () {
const out = exportTransactionsToCSVInner([...edgeTxs], 'BTC', 'USD', '100')
const out = exportTransactionsToCSVInner([...edgeTxs], 'BTC', 'iso:USD', '100')
expect(out).toEqual(csvResult)
})

test('export QBO matches reference data', function () {
const out = exportTransactionsToQBOInner([...edgeTxs], 'BTC', 'USD', '100', 1524578071304)
const out = exportTransactionsToQBOInner([...edgeTxs], 'BTC', 'iso:USD', '100', 1524578071304)
expect(out).toEqual(qboResult)
})
1 change: 1 addition & 0 deletions src/__tests__/components/ExchangeQuoteComponent.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ describe('ExchangeQuote', () => {
ourReceiveAddresses: ['receiveaddress1', 'receiveaddress2'],
parentNetworkFee: '10002',
signedTx: '298t983y4t983y4t93y4g98oeshfgi4t89w394t',
tokenId: null,
txid: 'txid1',
walletId: ''
}
Expand Down
1 change: 1 addition & 0 deletions src/__tests__/components/TransactionListRow.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ describe('TransactionListRow', () => {
networkFee: '100000',
ourReceiveAddresses: [],
signedTx: '0x12897491827459823745',
tokenId: null,
txid: '0x182748768724897ef897234',
walletId: 'lmnop'
}}
Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/exportCsvResult.csv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"CURRENCY_CODE","DATE","TIME","PAYEE_PAYER_NAME","AMT_ASSET","DENOMINATION","USD","CATEGORY","NOTES","AMT_NETWORK_FEES_ASSET","TXID","OUR_RECEIVE_ADDRESSES","VER","DEVICE_DESCRIPTION"
"CURRENCY_CODE","DATE","TIME","PAYEE_PAYER_NAME","AMT_ASSET","DENOMINATION","iso:USD","CATEGORY","NOTES","AMT_NETWORK_FEES_ASSET","TXID","OUR_RECEIVE_ADDRESSES","VER","DEVICE_DESCRIPTION"
"BTC","2018-04-23","09:49","Crazy Person","1230000","","12000.45","Income:Mo Money","Hell yeah! Thanks for the fish <<&&>>","10","txid1","receiveaddress1,receiveaddress2",1,"iphone12"
"BTC","2018-04-24","13:36","Crazy Person 2","-3210000","","36001.45","Expense:Less Money","Hell yeah! Here's a fish""","20","txid2","receiveaddress3,receiveaddress4",1,"iphone12"
"BTC","2018-04-25","17:23","Transfer","-3209980","","36001.22569188851","Transfer:Edge","","0","txid3","receiveaddress3,receiveaddress4",1,"iphone12"
Expand Down
36 changes: 18 additions & 18 deletions src/__tests__/exportQboResult.qbo
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ NEWFILEUID:NONE
<TRNAMT>1230000
<FITID>txid1
<NAME>Crazy Person
<MEMO>// Rate=0.00975646 USD=12000.45 category="Income:Mo Money" memo="Hell yeah! Thanks for the fish &lt;&lt;&amp;&amp;&gt;&gt;"
<MEMO>// Rate=0.00975646 iso:USD=12000.45 category="Income:Mo Money" memo="Hell yeah! Thanks for the fish &lt;&lt;&amp;&amp;&gt;&gt;"
<CURRENCY>
<CURRATE>0.00975646
<CURSYM>USD
<CURSYM>iso:USD
</CURRENCY>
</STMTTRN>
<STMTTRN>
Expand All @@ -56,10 +56,10 @@ NEWFILEUID:NONE
<TRNAMT>-3210000
<FITID>txid2
<NAME>Crazy Person 2
<MEMO>// Rate=0.0112154 USD=36001.45 category="Expense:Less Money" memo="Hell yeah! Here's a fish""
<MEMO>// Rate=0.0112154 iso:USD=36001.45 category="Expense:Less Money" memo="Hell yeah! Here's a fish""
<CURRENCY>
<CURRATE>0.0112154
<CURSYM>USD
<CURSYM>iso:USD
</CURRENCY>
</STMTTRN>
<STMTTRN>
Expand All @@ -68,10 +68,10 @@ NEWFILEUID:NONE
<TRNAMT>-3209980
<FITID>txid3
<NAME>Transfer
<MEMO>// Rate=0.0112154 USD=36001.22569188851 category="Transfer:Edge" memo=""
<MEMO>// Rate=0.0112154 iso:USD=36001.22569188851 category="Transfer:Edge" memo=""
<CURRENCY>
<CURRATE>0.0112154
<CURSYM>USD
<CURSYM>iso:USD
</CURRENCY>
</STMTTRN>
<STMTTRN>
Expand All @@ -80,10 +80,10 @@ NEWFILEUID:NONE
<TRNAMT>-20
<FITID>txid3-TRANSFER_TX
<NAME>Transfer
<MEMO>// Rate=0.0112154 USD=0.2243080996884 category="Expense:Network Fee" memo=""
<MEMO>// Rate=0.0112154 iso:USD=0.2243080996884 category="Expense:Network Fee" memo=""
<CURRENCY>
<CURRATE>0.0112154
<CURSYM>USD
<CURSYM>iso:USD
</CURRENCY>
</STMTTRN>
<STMTTRN>
Expand All @@ -92,10 +92,10 @@ NEWFILEUID:NONE
<TRNAMT>3210000
<FITID>txid4
<NAME>Transfer but actually income
<MEMO>// Rate=0.0112154 USD=36001.45 category="Transfer:Edge" memo=""
<MEMO>// Rate=0.0112154 iso:USD=36001.45 category="Transfer:Edge" memo=""
<CURRENCY>
<CURRATE>0.0112154
<CURSYM>USD
<CURSYM>iso:USD
</CURRENCY>
</STMTTRN>
<STMTTRN>
Expand All @@ -104,10 +104,10 @@ NEWFILEUID:NONE
<TRNAMT>-3210000
<FITID>txid4
<NAME>Transfer but no fee
<MEMO>// Rate=0.0112154 USD=36001.45 category="Transfer:Edge" memo=""
<MEMO>// Rate=0.0112154 iso:USD=36001.45 category="Transfer:Edge" memo=""
<CURRENCY>
<CURRATE>0.0112154
<CURSYM>USD
<CURSYM>iso:USD
</CURRENCY>
</STMTTRN>
<STMTTRN>
Expand All @@ -116,10 +116,10 @@ NEWFILEUID:NONE
<TRNAMT>-3209980
<FITID>txid5
<NAME>Transfer but no fiat amount
<MEMO>// Rate=0 USD=0 category="Transfer:Edge" memo=""
<MEMO>// Rate=0 iso:USD=0 category="Transfer:Edge" memo=""
<CURRENCY>
<CURRATE>0
<CURSYM>USD
<CURSYM>iso:USD
</CURRENCY>
</STMTTRN>
<STMTTRN>
Expand All @@ -128,21 +128,21 @@ NEWFILEUID:NONE
<TRNAMT>-20
<FITID>txid5-TRANSFER_TX
<NAME>Transfer but no fiat amount
<MEMO>// Rate=0 USD=0 category="Expense:Network Fee" memo=""
<MEMO>// Rate=0 iso:USD=0 category="Expense:Network Fee" memo=""
<CURRENCY>
<CURRATE>0
<CURSYM>USD
<CURSYM>iso:USD
</CURRENCY>
</STMTTRN>
<STMTTRN>
<TRNTYPE>DEBIT
<DTPOSTED>20180430082940.000
<TRNAMT>-3210000
<FITID>txid6
<MEMO>// Rate=0 USD=0 category="" memo=""
<MEMO>// Rate=0 iso:USD=0 category="" memo=""
<CURRENCY>
<CURRATE>0
<CURSYM>USD
<CURSYM>iso:USD
</CURRENCY>
</STMTTRN>
</BANKTRANLIST>
Expand Down
2 changes: 2 additions & 0 deletions src/__tests__/modals/AccelerateTxModal.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ describe('AccelerateTxModalComponent', () => {
otherParams: {},
ourReceiveAddresses: ['123123123'],
signedTx: '',
tokenId: null,
txid: '',
walletId: ''
}}
Expand All @@ -46,6 +47,7 @@ describe('AccelerateTxModalComponent', () => {
otherParams: {},
ourReceiveAddresses: ['123123123'],
signedTx: '',
tokenId: null,
txid: '',
walletId: ''
}}
Expand Down
1 change: 1 addition & 0 deletions src/__tests__/modals/AdvancedDetailsCard.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ describe('AdvancedDetailsCard', () => {
otherParams: {},
ourReceiveAddresses: ['123123123'],
signedTx: '',
tokenId: null,
txid: '',
walletId: ''
}}
Expand Down
1 change: 1 addition & 0 deletions src/__tests__/scenes/CryptoExchangeQuoteScene.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ describe('CryptoExchangeQuoteScreenComponent', () => {
ourReceiveAddresses: ['receiveaddress1', 'receiveaddress2'],
parentNetworkFee: '10002',
signedTx: '298t983y4t983y4t93y4g98oeshfgi4t89w394t',
tokenId: null,
txid: 'txid1',
walletId: ''
}
Expand Down
4 changes: 3 additions & 1 deletion src/__tests__/scenes/TransactionDetailsScene.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ describe('TransactionDetailsScene', () => {
otherParams: {},
ourReceiveAddresses: ['this is an address'],
signedTx: 'this is a signed tx',
tokenId: null,
txid: 'this is the txid',
walletId: fakeCoreWallet.id
},
Expand All @@ -110,14 +111,15 @@ describe('TransactionDetailsScene', () => {
isSend: true,
memos: [],
metadata: {
amountFiat: -6392.93,
exchangeAmount: { 'iso:USD': -6392.93 },
name: 'timmy'
},
nativeAmount: '-12300000',
networkFee: '1',
otherParams: {},
ourReceiveAddresses: ['this is an address'],
signedTx: 'this is a signed tx',
tokenId: null,
txid: 'this is the txid',
walletId: fakeCoreWallet.id
},
Expand Down
Loading
Loading