1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6107],{6107:function(t,r,e){"use strict";var s=e(85893),n=e(67294),a=e(19982),o=e(96486),u=e.n(o),c=e(25675),i=e(95591),p=e(15440),l=e(83068),d=e(137),m=e(85204);r.Z=function(t){var r=t.currency,e=(0,n.useState)(0),o=e[0],x=e[1],f=(0,p.Z)().getTransactions,h=(0,i.ZP)("getTransactions".concat(o),(function(){return f(r,t.pagination,20,o)})).data,v=null===h||void 0===h?void 0:h.data,g=null===v||void 0===v?void 0:v.transactions,w=function(t){switch(t){case"PENDING":return"Pending";case"SETTLED":return"Completed";default:return t}},j=g?u()(g).groupBy((function(t){return d.Z.compareDate(t.receivedAt)})).map((function(t,r){return{date:r,transactions:t.map((function(t){return{transactionType:t.type,amount:t.quantity,status:t.status}}))}})).value():[],b=function(t){switch(t){case"Deposit":return"Transfer from Business Account";case"Redemption":return"Withdrawal to Business Account"}},N=function(t){return function(){x(20*(t-1))}},y=1,F=1,k=(null===v||void 0===v?void 0:v.totalCount)?null===v||void 0===v?void 0:v.totalCount:0;k&&(F=Math.floor(k/20)+1,y=o>=k?F:Math.floor(o/20)+1);return(0,s.jsxs)("div",{className:"sprout-bg-white sprout-border sprout-rounded-2xl sprout-border-[#C4C4C4] ",children:[(0,s.jsxs)("div",{className:"sprout-overflow-auto sprout-w-full sprout-h-[32vh] md:sprout-h-[50vh]",children:[(!j||0===j.length)&&(0,s.jsx)("div",{className:"sprout-flex sprout-h-full sprout-items-center sprout-justify-center",children:(0,s.jsxs)("div",{className:"sprout-mx-auto",children:[(0,s.jsx)(c.default,{src:"/assets/pngs/earnTransactionsEmpty.png",width:163,height:166,alt:"Empty Earn Transactions"}),(0,s.jsx)(a.lW,{type:"caption",children:"You don't have any transactions"})]})}),j&&j.length>0&&j.map((function(t,r){return(0,s.jsxs)(n.Fragment,{children:[0===r&&(0,s.jsx)(s.Fragment,{children:(0,s.jsxs)("div",{className:"sprout-hidden lg:sprout-grid lg:sprout-grid-cols-12 lg:sprout-border-b lg:sprout-border-b-[#DADADA] lg:sprout-p-4",children:[(0,s.jsx)("div",{className:"sprout-col-span-1 sprout-text-sm sprout-text-[#2F2F2F]",children:"Type"}),(0,s.jsx)("div",{className:"sprout-col-span-4 sprout-text-sm sprout-text-[#2F2F2F]",children:"Activity"}),(0,s.jsx)("div",{className:"sprout-col-span-2 sprout-text-sm sprout-text-[#2F2F2F]",children:"Amount"}),(0,s.jsx)("div",{className:"sprout-col-span-5 sprout-text-sm sprout-text-[#2F2F2F]",children:"Status"})]})}),(0,s.jsx)("div",{className:"sprout-grid sprout-grid-cols-1 sprout-pl-4 sprout-pt-2",children:(0,s.jsx)("div",{className:"sprout-col-span-1 sprout-text-xs sprout-text-[#434343]",children:d.Z.compareDate(t.date)})}),t.transactions.map((function(t,r){return(0,s.jsx)(n.Fragment,{children:(0,s.jsxs)("div",{className:"sprout-grid sprout-grid-cols-12 sprout-border-b sprout-p-4",children:[(0,s.jsx)("div",{className:"sprout-col-span-1 sprout-text-sm sprout-text-[#2F2F2F] sprout-flex sprout-items-center",children:(0,s.jsx)("img",{className:"sprout-w-10",src:"../assets/icon/earn-table/".concat(t.transactionType,".svg"),alt:t.transactionType})}),(0,s.jsx)("div",{className:"sprout-col-span-4 sprout-flex sprout-flex-col sprout-my-auto",children:(0,s.jsx)("span",{className:"sprout-truncate sprout-pr-5 sprout-font-semibold sprout-text-sm sprout-text-[#2F2F2F]",children:b(t.transactionType)})}),(0,s.jsx)("div",{className:"sprout-col-span-2 sprout-flex sprout-gap-2 sprout-my-auto",children:(0,s.jsx)("span",{className:"sprout-col-span-6 sprout-text-sm sprout-font-semibold ".concat("Deposit"===t.transactionType?"sprout-text-[#2E7E16]":"sprout-text-[#DA2C44]"),children:"Deposit"===t.transactionType?"+ ".concat((0,l.Z)(t.amount)):"- ".concat((0,l.Z)(t.amount))})}),(0,s.jsx)("div",{className:"sprout-col-span-5 sprout-flex sprout-flex-col sprout-my-auto",children:(0,s.jsx)("div",{className:"sprout-text-right md:sprout-text-left",children:(0,s.jsx)(m.Z,{status:w(t.status)})})})]})},r)}))]},r)}))]}),t.pagination&&(0,s.jsxs)("div",{className:"sprout-flex sprout-p-2 md:sprout-p-4 sprout-w-full sprout-items-center sprout-justify-center md:sprout-justify-between",children:[(0,s.jsxs)("div",{children:[o+1," - ",o+20," from ",k," ","activities displayed"]}),(0,s.jsxs)("div",{className:"sprout-flex sprout-items-center sprout-gap-2",children:[function(t,r){var e=u().filter(u().range(t-2,t+3),(function(t){return t>=1&&t<=r}));return(0,s.jsxs)(s.Fragment,{children:[1===t?(0,s.jsx)("img",{src:"/assets/icon/transaction-table/previous-page-disabled.svg",width:"auto",height:"auto",alt:"<"}):(0,s.jsx)("img",{src:"/assets/icon/transaction-table/previous-page.svg",width:"auto",height:"auto",alt:"<",className:"sprout-cursor-pointer",onClick:N(t-1)}),(0,s.jsxs)("div",{className:"sprout-flex sprout-items-center sprout-gap-2",children:[!e.includes(1)&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(a.iR,{primary:!0,white:!0,className:"sprout-w-8 sprout-text-sm",onClick:N(1),children:"1"}),(0,s.jsx)("img",{src:"/assets/icon/transaction-table/ellipsis.svg",width:"auto",height:"auto",alt:"..."})]}),e.map((function(r){return t===r?(0,s.jsx)(a.iR,{primary:!0,orange:!0,className:"sprout-w-8 sprout-text-sm",children:r},r):(0,s.jsx)(a.iR,{primary:!0,white:!0,className:"sprout-w-8 sprout-text-sm",onClick:N(r),children:r},r)})),!e.includes(r)&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("img",{src:"/assets/icon/transaction-table/ellipsis.svg",width:"auto",height:"auto",alt:"..."}),(0,s.jsx)(a.iR,{primary:!0,white:!0,className:"sprout-w-8 sprout-text-sm",onClick:N(r),children:r})]})]}),t===r?(0,s.jsx)("img",{src:"/assets/icon/transaction-table/next-page-disabled.svg",width:"auto",height:"auto",alt:">"}):(0,s.jsx)("img",{src:"/assets/icon/transaction-table/next-page.svg",width:"auto",height:"auto",alt:">",className:"sprout-cursor-pointer",onClick:N(t+1)})]})}(y,F),(0,s.jsxs)("div",{className:"sprout-flex md:sprout-gap-2 md:sprout-items-center sprout-items-center sprout-gap-2",children:[(0,s.jsx)("span",{className:"sprout-text-base sprout-text-[#000000A6]",children:"Go to"}),(0,s.jsx)("input",{className:"sprout-w-8 lg:sprout-w-16 sprout-h-8 sprout-text-center !sprout-text-base sprout-border sprout-rounded-lg sprout-border-gray-400",type:"tel",placeholder:"1",onChange:function(t){N(+t.target.value)()}})]})]})]})]})}},15440:function(t,r,e){"use strict";var s=e(35666),n=e.n(s),a=e(92518);function o(t,r,e,s,n,a,o){try{var u=t[a](o),c=u.value}catch(i){return void e(i)}u.done?r(c):Promise.resolve(c).then(s,n)}function u(t){return function(){var r=this,e=arguments;
1return new Promise((function(s,n){var a=t.apply(r,e);function u(t){o(a,s,n,u,c,"next",t)}function c(t){o(a,s,n,u,c,"throw",t)}u(void 0)}))}}r.Z=function(){var t=(0,a.Z)(),r=u(n().mark((function r(){var e;return n().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,t.get("/earn/account");case 2:return e=r.sent,r.abrupt("return",e);case 4:case"end":return r.stop()}}),r)}))),e=u(n().mark((function r(e){var s;return n().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,t.get("/earn/account/trivium?accountId=".concat(e));case 2:return s=r.sent,r.abrupt("return",s);case 4:case"end":return r.stop()}}),r)}))),s=u(n().mark((function r(){var e;return n().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,t.get("/earn/accounts/trivium");case 2:return e=r.sent,r.abrupt("return",e);case 4:case"end":return r.stop()}}),r)}))),o=u(n().mark((function r(){var e;return n().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,t.get("/earn/user/trivium");case 2:return e=r.sent,r.abrupt("return",e);case 4:case"end":return r.stop()}}),r)}))),c=u(n().mark((function r(){return n().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,t.post("/earn/account");case 2:case"end":return r.stop()}}),r)}))),i=u(n().mark((function r(){var e;return n().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,t.get("/earn/balances");case 2:return e=r.sent,r.abrupt("return",e);case 4:case"end":return r.stop()}}),r)}))),p=u(n().mark((function r(e,s,a,o){var u,c,i,p;return n().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return u=s?"&paginate=".concat(s):"",c=a?"&limit=".concat(a):"",i=o?"&offset=".concat(o):"",r.next=5,t.get("/earn/transactions?currency=".concat(e).concat(u).concat(c).concat(i));case 5:return p=r.sent,r.abrupt("return",p);case 7:case"end":return r.stop()}}),r)})));return{getEarnAccount:r,getTriviumAccount:e,getAllTriviumAccounts:s,getTriviumUser:o,submitOnboarding:c,getRates:u(n().mark((function r(){var e;return n().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,t.get("/earn/rates");case 2:return e=r.sent,r.abrupt("return",e);case 4:case"end":return r.stop()}}),r)}))),deposit:u(n().mark((function r(e){var s;return n().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,t.post("/earn/deposit",e);case 2:return s=r.sent,r.abrupt("return",s);case 4:case"end":return r.stop()}}),r)}))),getEarnBalances:i,getTransactions:p,getRedemptionInfo:u(n().mark((function r(){var e;return n().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,t.get("/earn/redemption/info");case 2:return e=r.sent,r.abrupt("return",e);case 4:case"end":return r.stop()}}),r)}))),withdraw:u(n().mark((function r(e){var s;return n().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,t.post("/earn/withdraw",e);case 2:return s=r.sent,r.abrupt("return",s);case 4:case"end":return r.stop()}}),r)}))),getFixedDeposits:u(n().mark((function r(){var e;return n().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,t.get("/earn/fixed-deposits");case 2:return e=r.sent,r.abrupt("return",e);case 4:case"end":return r.stop()}}),r)}))),processFixedDeposit:u(n().mark((function r(e){var s;return n().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,t.post("/earn/fixed-deposits",e);case 2:return s=r.sent,r.abrupt("return",s);case 4:case"end":return r.stop()}}),r)})))}}},25675:function(t,r,e){t.exports=e(28045)}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.