aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/send_
diff options
context:
space:
mode:
Diffstat (limited to 'ui/app/components/send_')
-rw-r--r--ui/app/components/send_/send.utils.js3
-rw-r--r--ui/app/components/send_/tests/send-utils.test.js6
2 files changed, 5 insertions, 4 deletions
diff --git a/ui/app/components/send_/send.utils.js b/ui/app/components/send_/send.utils.js
index a35a55bf8..1c7fd2b42 100644
--- a/ui/app/components/send_/send.utils.js
+++ b/ui/app/components/send_/send.utils.js
@@ -139,7 +139,8 @@ function getAmountErrorObject ({
return { amount: amountError }
}
-function getParamsForGasEstimate (selectedAddress, symbol, data) {
+function getParamsForGasEstimate (selectedAddress, selectedToken, data) {
+ const { symbol } = selectedToken || {}
const estimatedGasParams = {
from: selectedAddress,
gas: '746a528800',
diff --git a/ui/app/components/send_/tests/send-utils.test.js b/ui/app/components/send_/tests/send-utils.test.js
index 4d471bcc1..903b531e6 100644
--- a/ui/app/components/send_/tests/send-utils.test.js
+++ b/ui/app/components/send_/tests/send-utils.test.js
@@ -147,9 +147,9 @@ describe('send utils', () => {
)
})
- it('should return value property if symbol provided', () => {
+ it('should return value property if selected token provided', () => {
assert.deepEqual(
- getParamsForGasEstimate('mockAddress', 'ABC'),
+ getParamsForGasEstimate('mockAddress', { symbol: 'ABC' }),
{
from: 'mockAddress',
gas: '746a528800',
@@ -160,7 +160,7 @@ describe('send utils', () => {
it('should return data property if data provided', () => {
assert.deepEqual(
- getParamsForGasEstimate('mockAddress', 'ABC', 'somedata'),
+ getParamsForGasEstimate('mockAddress', { symbol: 'ABC' }, 'somedata'),
{
from: 'mockAddress',
gas: '746a528800',